私はアプリケーションを開発するためにionicを使用しています。ドロップダウンボックスとリストをカスケード接続しようとしていますので、ドロップダウンからオプションを選択するとドロップダウンでの選択に関連するオプションを表示します。ここでは、ドロップダウンリストとリストのオプションが表示されません。だから、誰が何をやらなければならないのか、何が間違いなのかを説明できるのだろうか?ドロップダウンの内容を表示することができません
https://plnkr.co/edit/WDxFWFe7hxMsxnzqB2W5
controller.js:
carService.controller('carBrand',['$scope',function($scope){
//$scope.sample="Inside the cartype ctrl";
$scope.brandList=[
{'name':'Benz', 'types':['SUV', 'Sedan']},
{'name':'BMW', 'types':['SUV', 'Sedan', 'Van']}
];
$scope.home = function() {
window.location="#/menu.html";
};
$scope.addEntry=function(){
window.location="#/carEdit.html";
};
}]);
HTML:
<ion-view view-title="Car Type">
<ion-content ng-contorller="carBrand">
<h3> Add/Edit the Car Types </h3>
{{sample}}
Make:
<select ng-model="carBrand" ng-options="make for (make,types) in brandList">
<option value="">Select</option>
</select>
Type:
<ion-checkbox ng-model="cartype" ng-repeat="brandType in carBrand" ng-disabled="!carBrand">
<span>{{brandType}}</span>
</ion-checkbox><br><br>
<button ng-click="addEntry()">Edit</button>
<button ng-click="home()">Back</button>
</ion-content>
</ion-view>
私はそれが私がすでにNG-バインドを削除することで、コードを実行 –
SELECT'タグ'から –
申し訳ありません」= 'NG-バインドを削除してくださいまだ同じであることが残っています – sree