The following code doesn't work:
<select ui-jq='chosen' ng-model='trainer_list' multiple class="form-control" data-placeholder="Select Multiple Trainers" ng-options='trainer.id as trainer.name for trainer in trainers'>
</select>
I took this from an Angular Bootstrap theme, and I'm struggling to use it. Basically I want to use from this angular script
$http({
method: 'GET',
url: 'http://localhost/training_system/retrieve_train.php?trainer=Y'
}).success(function (result) {
$scope.trainers = result;
});
and use it in the combo box, i can't use static options, which apparently are the only ones working. what do i do?
UPDATE: So I tried the solution by Abhilash using ng-repeat instead of ng-options, and it worked the first few attempts. But now I could no longer repeat it, and all I have is an empty dropbox. I didn't change anything, but it's no longer working. Is it possible that ui-jq is incompatible with AngularJS?