comboBox com Angular

0 respostas
C
Bom dia, estou utilizando bootstrap com o plugin angularjs. Preciso popular um combobox com os dados que no controller.js. Estou fazendo assim: FactoryController.js:
$scope.datasource = FactoryService.list($scope.page);

$scope.selectedItem = {
    id: 0
};
diretiva:
.directive('ngCombobox', function($timeout) {
	    return {
	        restrict: 'A',
	        link: function postLink(scope, elm, attr) {
	            
	            scope.$watch(attr.list, function() {
	                elm.combobox;
	            });
	        }
	    }
	})
factory.html:
<select id="mySelect" class="combobox" ng-model="selectedItem.id" ng-combobox ng-options="p.id as p.nameEmploy for p in datasource.factory.employee"
		list="datasource.factory.employee">
	<option value=""></option>
</select>

Porém, não aparece nenhum dado no combobox. Alguém pode me ajudar?

Criado 18 de março de 2014
Respostas 0
Participantes 1