我有2个kendo UI下拉菜单。更改第一个下拉列表会更新第二个下拉列表中的项目 - 请考虑州和县的下降。
这是一个显示工作行为的道场: http://dojo.telerik.com/USuhi/2
如果您按照这些步骤操作的问题。
您希望selected.county为{" id":7," text":" IN 7"},bu it&#39 ; s实际上是空的!
有没有更好的方法让角度和剑道ui一起玩得很好并获得预期效果?
答案 0 :(得分:0)
根据道场,尝试更改此行
$scope.selected.county = null;
带
if ($scope.selected.state.text == "optionLabel") {
$scope.selected.county = null;
} else {
$scope.selected.county = {};
}
当然你应该对空项目进行更具体的搜索,也许是在id(例如-1)上。