>
> FWIW, if the list is set to multiple I use an array of the desired 
> selected values and set that array as the ng-model.  That lets you set the 
> default to multiple selected items in the list and get the multiple items 
> the user has selected
>

<select style="width: 100%;" size="6" ng-model="currentItems" multiple
                                    ng-multiple="true"
                                    ng-options="item.Description for item 
in availableItems"
                                    
ng-change="updateItemDependentControls()"></select>

In the initialization with the 1st and 3rd item selected I do something 
like :

    service.getItems(key) 
               .then(function (result) {
                   $scope.Items = result.data.d;
                   if ($scope.Items && $scope.Items .length > 0) {
                       $scope.currentItems= [];
                       $scope.currentItems.push($scope.availableItems[0]);  
// add 1st item  
                       $scope.currentItems.push($scope.availableItems[2]);  
// add 3rd item

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to