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

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

formula - R: how to pass in a reference to the variable in glm or lm? -