Q. How would I render a dynamic definition list using angular?
A new feature which allows ng-repeat-start/ng-repeat-end was added in
Angular 1.2.
With this feature, you can write your html like this:
<dl>
<dt ng-repeat-start=”i in items”>{{i.key}}</dt>
<dd ng-repeat-end>{{i.value}}</dd>
</dl>
Q. AngularJS – How can I reference the property name within an ng-Repeat
Try this:
<ul>
<li ng-repeat=”(key,val) in data”>{{key}}: {{val}}</li>
</ul>
The problem with documentation is that it says “(key, value)” with that
space … it took me some time to figure out that because of that it doesn’t
work
For more information, click the link below
http://mindmajix.com/angularjs-interview-questions
--
You received this message because you are subscribed to the Google Groups
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.