アイテムのリストが表示されている場所にアプリケーションを作成しています。アイテムが選択されると、別のセットのアイテムがチェックボックスでリストされている別のページにリダイレクトされ、アイテムをチェックボックスでチェックして後で処理することができます。私は最初のページのリストから項目を選択することができますが、問題は次のページにあります。選択された項目に関連する項目は表示されず、空白のままです。解決に手伝ってください。イオンリストを使用して選択したアイテムのサブアイテムを表示する
のhtmlページ1:
<ion-list>
<ion-item ng-model="carBrand" ng-repeat="name in carSelect" ng-click="selectItem(carBrand)">
<!--ion-item ng-click="selectItem(value)" ng-repeat="value in carSelect" ng-model="value.selected"-->
{{name.name}}
</ion-item>
</ion-list>
のhtmlページ2:
<ion-checkbox ng-repeat="brandType in newCarList">
<div align="center"><span>{{brandType.types}}</span></div>
</ion-checkbox><br><br>
コントローラ:
carService.factory('carRepository',function(){
var brandList={};
brandList.data= [
{'name':'Benz', 'types':['Truck', 'Regular']},
{'name':'BMW', 'types':['Oversize', 'Motorcycle']},
{'name':'Bently','types':['Regular']},
{'name':'Honda','types':['SUV','Truck']},
{'name':'Lexus','types':['Oversize','Motorcycle','Truck']},
{'name':'Toyota','types':['SUV']}
];
{
return brandList;
}
});
carService.controller('carBrand',['$scope','carRepository','$rootScope','$state',function($scope,carRepository,$rootScope,$state){
$rootScope.carSelect= carRepository.data;
$scope.newCarList=[];
$scope.selectedItem = 'select';
$scope.selectItem = function (key) {
$scope.newCarList.push(key);
$state.go('app.CarDetails');
}
$scope.addEntry = function() {
$state.go('app.carEdit');
};
}])
を取得するためのパラメータとして、それが機能していません。それを解決する別の方法がありますか? – sree