How do I set the ng-options default value...
here is my ng-option directive:
ng-options="val as val for val in ticket_group.splits"
How do I set the ng-options default value...
here is my ng-option directive:
ng-options="val as val for val in ticket_group.splits"
use ng-init
<select ng-init="myModel = ticket_group.splits[0]" ng-model="myModel" ng-options="val as val for val in ticket_group.splits"></select>
or set the myModel
value inside the controller,
$scope.myModel = ticket_group.splits[0]; // ticket_group.splits[1]; ticket_group.splits[2]; .. or what u need