<select class="form-control" ng-model="defaultFirstMenu" ng-options="item as item.menuName for item in firstLevelList"></select>
<select class="form-control" ng-model="defaultSecondMenu" ng-options="item as item.menuName for item in (filteredSecondLevelList = (secondLevelList | filter:{parent: defaultFirstMenu.menuName}))" ng-init="defaultSecondMenu = filteredSecondLevelList[0]"></select>
选项将在第二个下拉列表中填充,但ng-init无法设置默认选项。 之前未声明 defaultFirstMenu 。请帮忙。