Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ng-options should support datalist #13596

@twwwt

Description

@twwwt

Seems that the ng-options directive does not support elements inside a element. It would be great if ng-options could be extended.

Since an option inside a datalist (i) may not contain a label text (only a value attribute), (ii) may not contain elements, nor (iii) (multiple) selected options, the comprehension expression would consequently be simpler; something like
value in array for array data sources, and
(k, v) in object for object data sources.

Using this syntax for object data sources, it is not clear whether to render k or v into an option´s value attribute. Therefore, I propose the following syntax to make that clear:

`(k, _) in object` // render `k` as the value attribute value
`(_, v) in object` // render `v`  as the value attribute value

where _ is a kind of a anon variable indicating the part that is not used.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions