Attualmente sto utilizzando ui-select (https://github.com/angular-ui/ui-select) per i menu a discesa. Ho incluso select.js e select.css nel mio file index.html. Ho anche installato angolare-sanitizzare attraverso la pergola.Selezione interfaccia utente angolare non visualizzata
Questo è ciò che il mio controller appare come:
use strict';
angular.module('myApp.home', [ 'ui.select', 'ngSanitize']).controller('ScheduleCtrl', ScheduleCtrl);
ScheduleCtrl['$inject'] = [ '$stateParams', '$state' ];
function ScheduleCtrl($stateParams, $state) {
var vm=this;
vm.itemArray = [
{id: 1, name: 'first'},
{id: 2, name: 'second'},
{id: 3, name: 'third'},
{id: 4, name: 'fourth'},
{id: 5, name: 'fifth'},
];
vm.scheduleEvents = [{
id:1,
name:'Event1'
},
{
id:2,
name:'Event2'
}];
}
E mio punto di vista contiene:
<ui-select ng-model="selectedItem">
<ui-select-match>
<span ng-bind="$select.selected.name"></span>
</ui-select-match>
<ui-select-choices repeat="item in (vm.itemArray | filter: $select.search) track by item.id">
<span ng-bind="item.name"></span>
</ui-select-choices>
</ui-select>
Tuttavia, la mia vista è vuota e non sembra essere di colpire la direttiva ui-select .
Credo che un plunkr/jsfiddle sarebbe ottimo per ulteriori debug, confrontando i passi che hai fatto alla demo: http://plnkr.co/edit/juqoNOt1z1Gb349XabQ2?p=preview sembra che dovrebbe funzionare. Hai errori nella console? –
Sto lavorando per mettere insieme un plnkr ora. Nessun errore nella console. Non sta visualizzando nulla @erikSvedin – erichardson30
Hai provato a fare '{{item.name}}' invece di '' all'interno del tag ui-select-choices? –