선택 옵션 (selectpicker)을 채우려하고 있지만 성공하지 못했습니다. 내 competenceArray가 올바르게 채워지지만 내 HTML에는 옵션이 표시되지 않습니다.AngularJS와 함께 사용할 때 Selectpicker가 채워지지 않습니다.
누군가가 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');
});
}
}
})();
당신은 그래서 당신이 각 모듈 "재능"을 정의했다고 믿고있어 코드의 전체 문맥을 게시하지 않은
<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>