我有一個對象是這樣的:選擇NG選項不工作
"choiceList":[{"1":"cash"},{"2":"credit"}]
我想表明這個對象在select
元件,其中option
元素顯示現金和信用卡。 我有另一個變量,我想要保存1或2,如果選擇現金或信用。
HTML:
<select name="memoType" ng-model="lookUpValue">
<option value="">--Please Choose--</option>
<option ng-repeat="(key,value) in list">{{value}}</option>
</select>
後到現在爲止您做了什麼? –