Closed mattkrick closed 8 years ago
thoughts? @jordanh
Whoa, interesting. I can see why you'd want to do this. If you can't get it all in a single query, you'd have to do this work somewhere. I think this increases both utility and readability. The holy grail! 🍸
Yes, yes I say. Radness.
Would they combine with the @live
directive? I imagine they would...
yeah, this would cover all of our usecases except for the meeting members, where we derive things like isConnected, isSelf
. For things like that, we can memoize external to cashay.
closed with v0.20.0
Consider the following:
The sort/filter variables are going to be passed directly to the server. However, it's possible that we pull every doc from the server & then want to sort on different fields locally. Cashay doesn't know what sort/filter mean, so it needs its own directives:
localSort, localFilter
. The API might look like this:@localSort(field), @localFilter(field)
field
: defaults to the field name, useful if you sort on 2 distinct fields that have the same name (like id).Then, you just pass in an object that looks like this: