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:
//Get solution for ng-repeat //Add variable and assign with Object.key export class TestComponent implements OnInit{ objectKeys = Object.keys; obj: object = { "test": "value" "test1": "value1" } } //HTML {{key}} {{obj[key]}} 0 讨论(0) 查看其它17个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复