【发布时间】:2018-01-31 10:54:21
【问题描述】:
我是 Angular js 的新手。现在我有一个输入,我在其中实现了一个令牌字段。现在,输入框的value 属性具有数组中的值。现在我不知道我们如何使用array in the html。喜欢
value="abc,pqr"
这行得通,但我有一个数组,我需要在html 中使用该数组。
<div class="form-group">
<label for="inputEmail3" class="col-sm-2">Should</label>
<div class="col-xs-5">
<input name="should"
id="should"
type="text"
value=""
placeholder="should requirement"
class="form-control setmargin">
</div>
</div>
$scope.somevalues = ['abc','pqr','hhhh'];
这些值来自 ajax 调用。现在我有引导标记字段,所以我需要在该输入框中包含所有这些值。如何在 html 值属性中使用此数组值?
【问题讨论】:
-
您希望输入的值为
abc, pqr, hhhh吗? -
是的,因为它是引导令牌
标签: javascript jquery html angularjs twitter-bootstrap