我最近开始使用 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 模型永远不会更新,因此每当我尝试使用该值时,它总是未定义。我什至无法运行他们在文档页面中提供的示例,但我不确定我缺少什么。