1
http://plnkr.co/edit/KEhcaEs2GptBlF60KAXi?p=preview對象值不存在
我試圖在每個組中創建一個帶有多個選項的手風琴。 一旦在一個組中進行了選擇,它下面的組將被啓用並展開以允許進行下一個選擇。 我得到了UI的工作,但是當我存儲選擇時,每次選擇它時都會被覆蓋。
如何保留選定的值?
angular.module('ui.bootstrap.demo', ['ui.bootstrap']);
angular.module('ui.bootstrap.demo').controller('AccordionDemoCtrl', function ($scope) {
$scope. oneAtATime = true;
$scope.selectedCar = {
make: null,
model: null,
year: null,
comments: null
}
$scope.setSelectedCar = function (key, value) {
$scope.selectedCar[key] = value;
}
$scope.status = {
isFirstOpen: true,
isFirstDisabled: false
};
$scope.cars = {};
});