I'm trying to fill a select options (selectpicker), but without success. My competenceArray is filled correctly, but in my HTML never appears the options.
Someone can help me with the selectpicker ?
JS
(() => {
angular
.module('talent')
.controller('FunctionalityCreateCtrl', Create);
function Create($timeout, GatewayService) {
const vm = this;
vm.form = {};
vm.competencesArray = [];
getCompetences();
function getCompetences() {
GatewayService.get('/competences')
.then((data) => {
vm.competencesArray = data._embedded;
})
.catch(() => {
console.log('nope');
});
}
}
})();
HTML
<select
class="selectpicker"
data-style="select-with-transition"
title="Select a value"
data-size="7"
ng-model="functionality.form.comp"
ng-options="s.name for s in functionality.competencesArray">
<option value=""> Select</option>
<select>