标签:
in one of the following forms:
label
for
value
in
array
select
as
label
for
value
in
array
label
group by
group
for
value
in
array
select
as
label
group by
group
for
value
in
array
track by
trackexpr
label
for (
key
,
value
) in
object
select
as
label
for (
key
,
value
) in
object
label
group by
group
for (
key
,
value
) in
object
select
as
label
group by
group
for
(
key
,
value
) in
object
Where:
array
/ object
: an expression which evaluates to an array / object to iterate over.value
: local variable which will refer to each item in the array
or each property value of object
during iteration.key
: local variable which will refer to a property name in object
during iteration.label
: The result of this expression will be the label for <option>
element. Theexpression
will most likely refer to the value
variable (e.g. value.propertyName
).select
: The result of this expression will be bound to the model of the parent <select>
element. If not specified, select
expression will default to value
.group
: The result of this expression will be used to group options using the <optgroup>
DOM element.trackexpr
: Used when working with an array of objects. The result of this expression will be used to identify the objects in the array. The trackexpr
will most likely refer to the value
variable (e.g. value.propertyName
).
AngularJS select中ngOptions用法详解
标签:
原文地址:http://www.cnblogs.com/laixiangran/p/4947513.html