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

Bug in the expression parser/evaluator? #2496

Closed
Wizek opened this issue Apr 24, 2013 · 0 comments
Closed

Bug in the expression parser/evaluator? #2496

Wizek opened this issue Apr 24, 2013 · 0 comments

Comments

@Wizek
Copy link

Wizek commented Apr 24, 2013

Please see this simple plunk:
http://plnkr.co/edit/XtcH7n1onp3vS1RbVw4c?p=preview
(Click the buttons and see console for output.)

Both should be called once AFAIK.

So, is this a bug in angular's expression parser or am I mistaken?

Originally posted here: https://groups.google.com/forum/?fromgroups=#!topic/angular/GYT8XjQ_Dog

lgalfaso added a commit to lgalfaso/angular.js that referenced this issue Apr 25, 2013
Fix a context duplication and invocation to a previous context when
doing an access modifier function on the result of a function

Closes angular#2496
petebacondarwin pushed a commit that referenced this issue Apr 29, 2013
Fix a context duplication and invocation to a previous context when
doing an access modifier function on the result of a function
Currently, when doing `foo().bar()`, `foo` is called twice, the first
time to get the context and the second one for `bar` to get the
underlying object. Then the call to `bar` is called using the second
instance as self
This is equivalent to doing:
```
var instance1 = foo();
var instance2 = foo();
instance2.bar.apply(instance1);
```

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

No branches or pull requests

1 participant