-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Failing test for comparing two properties #3680
Conversation
There is https://github.com/jamesarosen/ember-cpm, but I agree, this would be nice in ember-core. Ember.computed.boundEqual = function(first, second) {
return Ember.computed(first, second, function(key, value) {
return get(this, first) === get(this, second);
});
}; |
@bradleypriest a bound equal or similar, should likely enumerate equality checks across all arguments.
I would assume one of the barriers to getting it in, is proper naming. |
@stefanpenner, agreed, I couldn't think of a better name. |
It might sound a little radical but I would route for having a separate official CP library with CPs as |
@twokul this will be completely unnecessary if we get composable cps in. Then you just have |
@hjdivad fair enough |
@hjdivad what do you mean by composable CPs? Is there a discussion on this somewhere? It sounds awesome |
@mehulkar we're working on them. We hope to submit a PR + open discourse discussion soon-ish. |
Very nice. Let me know if I can be useful |
I think we're going to work hard to get composable CPs in so I'm going to assume that it will be covered there. @mehulkar If you want to provide any review or feedback on that PR, that would be great. Thanks! |
Will do, thanks @wagenet ! |
It would be nice to be able to have a computed property for comparing two dependent keys.