加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularJS select指令ngOptions选项

发布时间:2020-12-17 08:42:54 所属栏目:安全 来源:网络整理
导读:in one of the following forms: for array data sources: label for value in array select as label for value in array label groupby group for value in array select as label groupby group for value in array trackby trackexpr for object data so

in one of the following forms:

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

Where:

  • 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).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读