I am trying to do some things in Angular 2 Alpha 28, and am having an issue with dictionaries and NgFor.
I have an interface in TypeScript looking like this:
Updated : Angular is now providing the pipe for lopping through the json Object via keyvalue
:
{{item.key}}:{{item.value}}
WORKING DEMO , and for more detail Read
Previously (For Older Version) : Till now the best / shortest answer I found is ( Without any Pipe Filter or Custom function from Component Side )
Component side :
objectKeys = Object.keys;
Template side :
Key: {{key}}
{{ obj.title }}
{{ obj.desc }}
WORKING DEMO