Dynamically Add Options To A Angular Chosen Combo Box March 08, 2024 Post a Comment The following code doesn't work: ng-model='trainer_list'multipleclass="form-control"data-placeholder="Select Multiple Trainers"><optionvalue="{{trainer.id}}"ng-repeat="trainer in trainers"> {{trainer.name}} </option></select>CopyDebug your variable trainersJust add this code anywhere in your page to debug,<label> To Do: Remove this after testing. Trainer = {{trainers}} </label> CopyAnd see what are the values in trainer. Is this variable is updating after your server call?Solution 2: This is how I resolved it:In your select tag, put ng-if="trainers". This would prevent DOM loading until your http request is completed Share Post a Comment for "Dynamically Add Options To A Angular Chosen Combo Box"
Post a Comment for "Dynamically Add Options To A Angular Chosen Combo Box"