I have a 'detailsMap : any' variable from the backend that contains multiple rows in the format (key1,key2). I need to display this data in the UI using TypeScript/Angular2. Please advise on how I can achieve this.
key1 : { Name:'ABC' , address :'JKL street 123', phone:'012345678' }
key2 : { Name:'QER' , address :'STR street 123', phone:'888888888' }
I am trying to display the data in a fixed static template as shown below, but it is not working and I'm getting an error ''Test.html:7 ERROR TypeError: Cannot read property 'key1' of undefined'
<div >
<div >{{
detailsMap['key1'].Name}}</div>
<div >{{
detailsMap['key1'].address}}</div>
</div>
<div >
<div >{{
detailsMap['key2'].Name}}</div>
<div >{{
detailsMap['key2'].address}}</div>
</div>