Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

AngularJS ng-selected Directive

AngularJS ng-selected Instruction

AngularJS Reference Manual AngularJS Reference Manual


AngularJS Examples

Get the selected option:

Click the checkbox to select the BMW option:

<

input

type=

"checkbox"

ng-model=

"mySel"

<

p

My favorite car:

<

/p

<

select

<

option

Volvo

<

/option

<

option

ng-selected=

"mySel"

BMW

<

/option

<

option

Ford

<

/option

<

/select

Try it »


Definition and Usage

ng-selected The directive is used to set