0
NG-模型的值是簡單的數字數組:[8]使用UI-JQ預選上下拉選項不作品
HTML代碼
<select ui-jq="chosen" multiple="true" class="w-md" name="careers" id="careers" ng-model="loan_plan.careers" ng-options="opt.id as opt.id for opt in careersOptions" >
</select>
並且選項是對象數組
[
{
id: 10,
name: "statistician",
description: "Food truck artisan 3 wolf moon tilde. Franzen aesthetic you probably haven't heard of them ennui tumblr. Fingerstache distillery ugh. Meggings you probably haven't heard of them lomo. Mixtape jean shorts pbr&b twee chillwave authentic trust fund."
},
{
id: 9,
name: "engineer",
description: "Wes anderson polaroid jean shorts meggings etsy roof listicle 90's. Tote bag plaid green juice. Microdosing 8-bit austin migas."
},
{
id: 8,
name: "police officer123434",
description: "Tattooed vinyl jean shorts irony. Iphone wolf kinfolk austin venmo semiotics authentic slow-carb. Farm-to-table poutine letterpress asymmetrical hammock microdosing. 3 wolf moon viral offal portland."
}
]
正如你可以看到8號已經加載頁面
前已經存在,但它並沒有作爲s當選文本字段
喜也沒有工作,請看到我的更新〜 – newBike