javascript - Angular js ng-repeat not working for server response -
i have response object server this
$scope.new = {"module":"a","link":"b"}
how use ng-repeat display 2 items?
<div ng-repeat="item in new"> {{item}} -- {{item.module}} -- {{item.link}} </div>
here's how iterate through each property within object:
<div ng-repeat="(key,item) in new"> {{ key }}: {{ item }} </div>
note we're using (key,item)
instead of item
have access key of property.
Comments
Post a Comment