diff --git a/src/accordion/docs/demo.js b/src/accordion/docs/demo.js index 27127fb150..f6604313d0 100644 --- a/src/accordion/docs/demo.js +++ b/src/accordion/docs/demo.js @@ -15,6 +15,7 @@ function AccordionDemoCtrl($scope) { $scope.items = ['Item 1', 'Item 2', 'Item 3']; $scope.addItem = function() { - $scope.items.push('Item ' + $scope.items.length); + var newItemNo = $scope.items.length + 1; + $scope.items.push('Item ' + newItemNo); }; -} \ No newline at end of file +}