angularjs - How to pass $index as a object key in ng-repeat? -


i facing problem angular have dynamic generated object in form below

object:{     0: [],     1: [] } 

this set in angular controller in html side want this

<tr ng-repeat="comapny in companies">    <td ng-repeat="option in object.$index">{{option.name}}</td> </tr> 

$index comes tr ng-repeat wraps ng-repeat $index variable.

is possible?

if have object can access array

option in object[$parent.$index] 

you need use $parent.$index because want access $index of first ng-repeat.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -