Binds the given expression to the value of
ngValue
is useful when dynamically generating lists of radio buttons using ngRepeat
, as shown below.
Likewise, ngValue
can be used to generate <option>
elements for the select element. In that case however, only strings are supported for the valueattribute
, so the resulting ngModel
will always be a string. Support for select models with non-string values is available via ngOptions
.