0
<select ng-model="form.priority" ng-options="priority.id as priority.value for priority in leadPriority"></select> 

It is showing blank option by default. How can remove it ?

1
  • Check this. You can set in the controller as $scope.form.priority = $scope.leadPriority[0].id; Commented Jun 10, 2015 at 8:20

3 Answers 3

1

Use ng-init in options eg.

<select ng-model="form.priority" ng-options="priority.id as priority.value for priority in leadPriority" ng-init="form.priority = leadPriority[0].id"></select> 
Sign up to request clarification or add additional context in comments.

Comments

1

You can set in the controller as,

$scope.form.priority = $scope.leadPriority[0].id; 

Comments

0

You can use ui-select which is more powerful version of select. You can find sample code for it here. You will need to include the js and css file from their library here.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.