javascript - Complex json ng-repeat -
i try ng-repeat on object, tried several times still stuck. if have idea, , if it's possible share tips kind of situation.
[ { "abonnement": { "id": "1", "nom": "bas prix", "tarif": "2.49", "communication": "2h de communication", "vers": "vers fixes et mobiles", "zone": "zone nationale" } }, { "abonnement": { "id": "2", "nom": "national", "tarif": "9.99", "communication": "t\u00e9l\u00e9phonie et sms illimit\u00e9s", "vers": "vers fixes et mobiles", "zone": "zone nationale" } }, { "abonnement": { "id": "3", "nom": "euro", "tarif": "19.99", "communication": "t\u00e9l\u00e9phonie et sms illimit\u00e9s", "vers": "vers fixes et mobiles", "zone": "zone euro" } } ]
if array stored in scope under $scope.abonnements
, how use ng-repeat
:
<ul> <li ng-repeat="item in abonnements">{{ item.abonnement.nom }}</li> </ul>
see here: http://jsfiddle.net/89b98cpd/
Comments
Post a Comment