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.

angularjs fails to parse "( aaa, bbb) in xxx" (extra space before "aaa") in ngRepeat value #6827

Closed
@davidmichaelkarr

Description

@davidmichaelkarr

I noticed that an ngRepeat value of "( aaa, bbb) in xxx" or "(aaa, bbb ) in xxx" fails to parse.

It results in an error like the following:
Error: [ngRepeat:iidexp] 'item' in 'item in collection' should be an identifier or > '(key, value)' expression, but got '( aaa, bbb)'.

I've been told that the regexp that validates this string is the following:

^(?:([$\w]+)|(([$\w]+)\s_,\s_([$\w]+)))$

In the interest of completeness and "least surprise", this regexp (along with any corresponding required code) should be changed to include "\s*" before the key and after the value.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions