Как привязать другой пользовательский интерфейс выберите
Я использую угловой UI-Select. У меня было два ui-select, выбор первого ui-select вернет списки элементов, которые разбираются во второй ui-select. В настоящее время мой первый пользовательский интерфейс выбран, а второй пользовательский интерфейс показывает ошибку.
HTML
ui-select(ng-model='location.update_country', theme='select2', style='min-width: 300px;', title='Choose a country', on-select="SelectCountry()")
ui-select-match(placeholder='Select country') {{$select.selected.name}}
ui-select-choices(repeat='c in countries_list | filter: $select.search')
div(ng-bind-html='c.name | highlight: $select.search')
ui-select(ng-model='location.update_state', theme='select2', style='min-width: 300px;', title='Choose a state')
ui-select-match(placeholder='Select state') {{$select.selected.name}}
ui-select-choices(repeat='c in states_list | filter: $select.search')
div(ng-bind-html='c.name | highlight: $select.search')
контроллер
$scope.SelectCountry = function(){
Service.GetStatesByCountry($scope.location.update_country.id, function(states){
$scope.states_list = states; // states variable show correct lists of state
});
}
ошибка консоли
angular.min.js:118 Ошибка: [filter: notarray] http://errors.angularjs.org/1.5.8/filter/notarray?p0=%7B%22returnCode%22%3A00-00-00%2000%3A00%3A00%22%2C%22country_name%22%3A%22Indonesia%22%7D%5D%7D