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

fix($parse): allow arguments to contain filter chains #14720

Closed
wants to merge 1 commit into from

Conversation

petebacondarwin
Copy link
Contributor

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

fix

What is the current behavior? (You can also link to an open issue here)

call expressions cannot take filter chains as parameters

What is the new behavior (if this is a feature change)?

call expressions can take filter chains as parameters

Does this PR introduce a breaking change?

No

Please check if the PR fulfills these requirements

Other information:

Closes #4175
Closes #4168

@gkalpak
Copy link
Member

gkalpak commented Jun 6, 2016

LGTM (as long as Travis is happy)

@Narretz
Copy link
Contributor

Narretz commented Jun 6, 2016

Does this impact performance?

@petebacondarwin
Copy link
Contributor Author

@Narretz - no real impact on performance. The filterChain method looks like this:

``js
filterChain: function() {
var left = this.expression();
var token;
while ((token = this.expect('|'))) {
left = this.filter(left);
}
return left;
},


You can see that it is calling straight through to `this.expression()` anyway, and then if the next token is not a pipe it falls out.

petebacondarwin added a commit that referenced this pull request Jun 6, 2016
Thanks to @esarbanis for the original PR that got out-dated due to the
big $parse overhaul.

Closes #4175
Closes #4168
Closes #14720
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng-click and filter don't work together
4 participants