我有我的HTML端輸入文本NG-模型值,設置angularjs由對象值
<input ng-model="item.valueProperty"
ng-disabled="item.options.length>0"
type="text"
placeholder="List item value"
class="form-control"
required>
如果item.options
數組有任何項目,我的文本框的值(item.valueProperty
)將被設置爲key
但我想通過ng-
指令在html端進行此操作。
我無法在javascript控制器上設置它。這可能嗎?
你能解釋一下你面臨的問題嗎? – Ved
按選項長度設置輸入值。如果item.valueProperty的項目值爲「key」 – barteloma
,那麼item.valueProperty的值爲「key」? – Ved