angularjs - How to iterate through an array within the object in angular -


this how array in data:

$scope.persons = [{  cc:["abqwqe12c", "iu63enwzy", "dj101oqaq"] },  { cc:["erie1wka", "irt2naszsd", "riger1oq"] }] 

in html displays array when called {{person.cc}}. below doesn't give anything.

 <div ng-repeat = "person in persons">     <div ng-repeat = "ccs in person">      {{ccs.cc}}     </div>   </div>   

you want inner repeat loop on person.cc property array

 <div ng-repeat = "person in persons">      <div ng-repeat = "ccs in person.cc">         {{ccs}}       </div>   </div>  

Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -