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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -