Skip to content Skip to sidebar Skip to footer

AngularJS: How To Generate Dynamic Ng-model For Input Type = Text

My current scenario is: I've doing nesting repetition like follow:
    &l

Solution 1:

You can use an object - make the task.id as the key:

$scope.taskValues = {};

And the view:

<input type="text" ng-model="taskValues[task.id]">

Post a Comment for "AngularJS: How To Generate Dynamic Ng-model For Input Type = Text"