angular ja ui-select did not show the model values

35 views Asked by At

I am using angular js ui select plugin for my drop down. this is the code

HTML

 <div class="col-sm-8 categoryWrapper">
                            <select ui-select2="{minimumResultsForSearch:10}" ng-model="screenList.approvalGrp"
                                multiple data-placeholder="*Category" class="form-control" id="category" required
                                ng-init="loadApprovalGroups()" ng-options="group.groupName for group in groupList">
                                <option value=""></option>
                            </select>
                            {{screenList.approvalGrp}}
                        </div>

this is the browser view. i prited it. please check this screen shot

ui select to view I need to load model values as the selected values.

this is the view that i exactly want enter image description here

how i do this correctly ?

1

There are 1 answers

0
H. M Mahmudul Hasan On

You need to reassign your values to the model.

$scope.screenList.approvalGrp = screenList.approvalGrp //[{item1}, {item2}]