【发布时间】:2020-04-15 08:02:29
【问题描述】:
我在 Typescript 中有一个 opt 变量
let opt = [{}];
如果我想使用 for 循环将多个子项添加到选择变量到下面的示例中
options = [
{ name: "option1", value: 1 },
{ name: "option2", value: 2 }
]
如何编码
for(i=0; i<=5; i++) {
...
}
【问题讨论】:
-
你的预期输出是什么
-
我想在 html 中用于选择选项值
-
这能回答你的问题吗? How to add Array in Array element
标签: angular typescript