Rows data should be existing while adding empty rows to table using Angularjs -


basically, adding empty rows table working in angular-1.0.1.js when im using same function using angular-1.2.13.js 1 row adding if tried add row it's not working.

link1 above example using angular-1.0.1, link2 code using angular-1.2.13 , row data should retrieving "link1" code. tried combine both examples link3 here solution got.can 1 tel me how add multiple rows.

i new , started working on angularjs past 3 days, hope gave clear explanation.

i'm not quite sure why isn't working 1.2.13 either changing ng-repeat ...

fruit in fruits track $index 

... or changing both ng-click , associate function ...

<button ng-click="addfruit(newfruit)">add</button>  $scope.addfruit=function(newfruit){   $scope.fruits.push(newfruit); } 

... trick.


Comments