angularJS select指令ngOptions选项

前端之家收集整理的这篇文章主要介绍了angularJS select指令ngOptions选项前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

in one of the following forms:

@H_404_2@
  • for array data sources: @H_404_2@
  • labelforvalueinarray
  • selectaslabelforvalueinarray
  • labelgroupbygroupforvalueinarray
  • selectaslabelgroupbygroupforvalueinarraytrackbytrackexpr
  • for object data sources: @H_404_2@
  • labelfor(key,value)inobject
  • selectaslabelfor(key,value)inobject
  • labelgroupbygroupfor(key,value)inobject
  • selectaslabelgroupbygroupfor(key,value)inobject
  • Where:

    @H_404_2@
  • array/object: an expression which evaluates to an array / object to iterate over.
  • value: local variable which will refer to each item in thearrayor each property value ofobjectduring iteration.
  • key: local variable which will refer to a property name inobjectduring iteration.
  • label: The result of this expression will be the label for<option>element. Theexpressionwill most likely refer to thevaluevariable (e.g.value.propertyName).
  • select: The result of this expression will be bound to the model of the parent<select>element. If not specified,selectexpression will default tovalue.
  • 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. Thetrackexprwill most likely refer to thevaluevariable (e.g.value.propertyName).
  • 猜你在找的Angularjs相关文章