0
私は基本的なui-selectコンポーネントを持っており、ui-selectの別のリストを取ることもできます。ui-selectで選択リストを変更するには?
ここで「somelist
」を「anotherlist
」に変更するには、ボタンをクリックするか他の関数呼び出しを使用します)。
<ui-select ng-model="obj.selected">
<ui-select-match>{{$select.selected.dsc}}</ui-select-match>
<ui-select-choices repeat=" X in somelist | propsFilter: {dsc: $select.search}">
<div ng-bind-html="X.dsc | highlight: $select.search" position='down'></div>
</ui-select-choices>
</ui-select>
<button>Change list</button>
'somelist'の代わりに' anotherlist'と書いてください。 :O –
プログラム的に? –
周りに何らかの条件がある必要がありますよね?条件に基づいてng-ifまたはng-show/hideを実行します。 – sisyphus