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

Parse loop vars #15954

Closed
wants to merge 4 commits into from
Closed

Parse loop vars #15954

wants to merge 4 commits into from

Conversation

epliskin
Copy link

@epliskin epliskin commented May 2, 2017

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  1. bug fix in ngRepeat and ngOptions directives; 2) new property of $parse service

What is the current behavior? (You can also link to an open issue here)
Non-ascii loop variable names are not valid, even under ngParseExt extension. See issue #15926.

What is the new behavior (if this is a feature change)?
Resolves #15926.

Does this PR introduce a breaking change?
no

Please check if the PR fulfills these requirements

Other information:
$parse service is amended with new function property "is_valid_identifier()" which is used by ngOptions and ngRepeat directives to test loop variable names.

@Narretz
Copy link
Contributor

Narretz commented May 9, 2017

Thanks for the PR - it's good to see that this would be theoretically possible. However, I'm not sure if it makes sense to expose a completely new API for this, as this is developer accessible, and we would need tests for this, too. I also feel like it should be possible to reuse $parse code better.
Side note: the badident error is for ngRepeat, we should not reuse it if we implement this.

I'd love to hear what others have to say, though.

@mgol
Copy link
Member

mgol commented Mar 28, 2018

I'd like to avoid exposing the new API as well.

Narretz added a commit to Narretz/angular.js that referenced this pull request Jan 14, 2019
Narretz added a commit to Narretz/angular.js that referenced this pull request Jan 14, 2019
Narretz added a commit to Narretz/angular.js that referenced this pull request Jan 21, 2019
@Narretz Narretz closed this in fbc83f0 Jan 21, 2019
Narretz added a commit that referenced this pull request Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cyrillic loop variable name in ngRepeat not supported by ngParseExt module
4 participants