I am currently working with multiple ui-select in AngularJS, and I have encountered an issue when trying to populate data into a model as it throws an error:
https://i.sstatic.net/NcVJD.png
<ui-select multiple ng-model="control_access.antennas_select_input" theme="bootstrap" search-enabled="true"
reset-search-input="true" close-on-select="false">
<ui-select-match class="ui-select-match">{{$item.name}}</ui-select-match>
<ui-select-choices class="ui-select-choices" repeat="antennasInput in (antennasDataInput) track by $index">
{{antennasInput.name}}
</ui-select-choices>
</ui-select>
$scope.editForm = function () {
$scope.control_access.antennas_select_input = [<%= AntennaInstalled.all.to_json %>];
}
var action = $("#action_control_access").val();
if(action == "edit"){
$scope.editForm();
}