-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add target support for pipe #357
base: master
Are you sure you want to change the base?
add target support for pipe #357
Conversation
@mum-never-proud Thanks for the PR! Do you think it is possible to implement binding context and currying args with the new Ember helpers without modifications to the library? My initial feeling is we ca (also https://guides.emberjs.com/release/components/helper-functions/ |
Hey thanks for the ref, I have gone through the page....Still I don't think we can use it to resolve the result in the given context.... May be I am a bit dumb here... I couldn't see any helper that would help me resolve in the custom context A dumb e.g If I wanna pipe the result of Also when it comes to mixed contexts like calling a function from service I couldn't see it happening Pardon me for my bad English but can you let me know how we can solve the above scenario? |
My feeling is users have an acceptable escape hatch today. Here is an example (although a crude example). In a normal component, we have
I can try to help and add some examples if you would like... |
@snewcomer thanks for a wonderful example :) Idk just because I just started contributing to OS, my view might be different or totally wrong in this case I agree that users have an acceptable escape hatch these days to me i think the reason we develop such wonderful libraries to
so if we are letting the user do stuff in this case this.squareRoot = function(x) {
this.calculateService.set('value', Math.sqrt(x));
}.bind(this); then I think the user can do other things as well that this library provides. hope I ain't blunt, I just wanted to understand things that I am relatively new to :) #178 I find that syntax simpler than currently proposed pardon me if I didn't understand your solution and thanks for your patience 💪 |
Closes #178
Changes proposed in this pull request
both
pipe
andpipe-action
will now support target attribute and resolve in the provided context.Though I have written the test cases and covered the scenarios my instinct still says I am missing something ;)
Let me know for any changes or enhancements!
thank you!