最近、LumX フレームワークを使い始めました。ここでSelects ディレクティブを使用しようとしていましたが、ドキュメントについては明確ではありません。これは私がこれまでに得たものです:
<lx-select ng-model="selectedPriority" placeholder="Priority" choices="priorities">
<lx-select-selected>
{{ $selected.name }}
</lx-select-selected>
<lx-select-choices>
{{ $choice.name }}
</lx-select-choices>
</lx-select>
そして、これが優先順位を定義する方法です(lx-selectを含むdivのコントローラー内)
$scope.priorities = [
{ name: 'Urgent', id: 1 },
{ name: 'Very important', id: 2 },
{ name: 'Not important', id: 3 },
{ name: 'None', id: 4 }
];
これにより、選択するリストが得られますが、selectedPriority モデルは更新されないため、その値を使用しようとすると常に未定義になります。ドキュメントページで提供されている例を実行することさえできませんが、何が欠けているのかわかりません。