In html
<select class="element-margin-top" ng-model="vm.selectedRole" ng-options="(roleName,enabled) in vm.roleNames">
<option value="">All Roles</option>{{vm.roles[0]}}
</select>
I want to display all the array elements in select options.I dont understand what is going on in this.It is giving me error related to (roleName,enabled) in vm.roleNames
In js:
var vm = this;
vm.roleNames = ['SuperAdmin','Admin','Retailer','Manufacturer'];
vm.selectedRole = vm.roleNames[-1];
I want first element to be selected by default.