【发布时间】:2017-03-22 06:23:43
【问题描述】:
目前我正在使用 angular,并且我在 typescript 文件中有一个这样的数组。
var channelArray = {"channel1", "channel2", "channel3"}
在我的 html 中,我有类似
的代码<div *ngFor="let val of channelArray">
<de-series-prop></de-series-prop>
</div>
如何将数组的索引传递给 series-prop 组件。我需要索引值在 series-prop 组件中分配一些值。
【问题讨论】:
-
你的意思是一个JS对象。
标签: angular typescript