Trying to select multiple options in angularjs regarding to object values
Here is a code:
myapp.controller(\'myctrl\', [ \'$scope\',
Using a model for statuses ($scope.statuses), and ng-options to iterate over them:
function MyCtrl($scope) { $scope.statuses = [ 'Draft', 'Pending', 'Live', 'Archived', 'Deleted' ]; $scope.selectedStatuses = [ 'Pending', 'Live' ]; }
.