Editable List in Angularjs -


i create list user can not edit individual steps, edit number of steps well. how can in angularjs?

the problem i'm having if use ng-model in "ol" don't think can create list of individual elements, if use ng-repeat in "li" don't think can add new elements list. what's best way solve this?

you can this:

js:

$scope.range = function(min, max, step) {     step = step || 1;     var input = [];     (var = min; <= max; += step) {         input.push(i);     }     return input; }  $scope.list = [];  $scope.printlist = function(){     console.log($scope.list); } 

html:

<input type="number" ng-click="printlist()" ng-model="len"> <ol>     <li ng-repeat="n in range(0,len-1)"><input type="text" ng-model="list[n]"></li> </ol> 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -