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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -