Angular And Typescript Looping Through Object
I am trying to learn TypeScript and Angular. I have an object that I would like to loop through and pull key:value pairs so I can create buttons dynamically in HTML. In HTML when I
Solution 1:
If are you using angular 2, then use ngFor
instead of ngRepeat
<div *ngFor="let o in menu_parts">
{{o}}
</div>
As for [object object]
you have to use json
filter to show all the content a JSON array
{{menu_parts | json}}
Post a Comment for "Angular And Typescript Looping Through Object"