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-option should work when it contains newlines. #4142

Closed
@jamie-pate

Description

@jamie-pate

It seems like we should be able to do this

<select ng-options="o.name as o.name
                    for o in model.options
                    | filter:{$hide:'!true'}"></select>

but it throws

Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got 'o.name as o.name
                    for o in model.options
                    | filter:{$hide:'!true'}'.

I could prepare a pr if this seems like something that should be supported.
(Would I need to count \n as whitespace when parsing all expressions? Is this a larger issue with expressions in general? Are there any horrible horrible failure cases this would cause?)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions