javascript - Insert $index into name attribute in an ng-repeat angularJS -
in order asp.net mvc correctly bind list of items on form post, name attribute has along lines of
name='show.days[0].openhour' name='show.days[1].openhour' the user can enter number of days show form field, updates model , ng-repeat. i'd able insert appropriate index name field, like
name='show.days[$index].openhour' is possible angular?
use name="show.days[{{$index}}].openhour". this, angularjs evaluates $index , replaces correct value.
Comments
Post a Comment