blob: 390bc03031b1147105f0f984a2849ffea20cb23e [file] [log] [blame]
Matteo Scandolo7cd88ba2015-12-16 14:23:08 -08001angular.module('ui.bootstrap.demo').controller('AccordionDemoCtrl', function ($scope) {
2 $scope.oneAtATime = true;
3
4 $scope.groups = [
5 {
6 title: 'Dynamic Group Header - 1',
7 content: 'Dynamic Group Body - 1'
8 },
9 {
10 title: 'Dynamic Group Header - 2',
11 content: 'Dynamic Group Body - 2'
12 }
13 ];
14
15 $scope.items = ['Item 1', 'Item 2', 'Item 3'];
16
17 $scope.addItem = function() {
18 var newItemNo = $scope.items.length + 1;
19 $scope.items.push('Item ' + newItemNo);
20 };
21
22 $scope.status = {
23 isFirstOpen: true,
24 isFirstDisabled: false
25 };
26});