2
我正面臨Angular和Ionic的問題。我有下面的代碼片段:帶離子角的空選擇框ng-option
控制器:
app.controller('CatagoryItemsContoller', ['$scope', function($scope) {
'use strict';
$scope.stringArr = ["Yes","No","MayBe"];
$scope.selectedItem = "Yes";
}]);
HTML:
<ion-view ng-controller="CatagoryItemsContoller">
<div class="item item-input item-select item-margin">
<div class="input-label">
Pick
</div>
<select ng-model="selectedItem" ng-options="o as o for o in stringArr"></select>
</div>
</ion-view>
我總是得到一個空的選擇框。這裏發生了什麼?
注:我通過角度路由登陸到此頁面。
已更正,但同一個空的選擇框 – Anil8753