Iterate over object in Angular

前端 未结 17 1629
攒了一身酷
攒了一身酷 2020-11-22 12:19

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:

17条回答
  •  鱼传尺愫
    2020-11-22 12:37

    In JavaScript this will translate to an object that with data might look like this

    Interfaces in TypeScript are a dev time construct (purely for tooling ... 0 runtime impact). You should write the same TypeScript as your JavaScript.

提交回复
热议问题