I think this has been mentioned before, but if you want to reuse a set of
computing functions in multiple elements, you can put them in a behavior.

Here's a demo:

http://plnkr.co/edit/zvLK3HDtX3DBBU5BXTF9?p=preview


On Tue, Jun 23, 2015 at 4:38 PM, Steven Bennetts <[email protected]>
wrote:

> In Polymer .5, it was pretty convenient to write:
>
> <div hidden$="{{someSelector != 'foo'}}">
>
> Is there a general way to do this in Polymer 1.0 other than include
> something like:
>
> <div hidden$="[[equals_(someSelector, 'foo']]">
> equals_: function(a, b) { return a == b; }
>
> in every Polymer element that needs this?
>
>  Follow Polymer on Google+: plus.google.com/107187849809354688692
> ---
> You received this message because you are subscribed to the Google Groups
> "Polymer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/CADko7PFun%2BEoBpvNtDDPdyKdWfi5s210aOFqbgCci-qa_VnyVg%40mail.gmail.com
> <https://groups.google.com/d/msgid/polymer-dev/CADko7PFun%2BEoBpvNtDDPdyKdWfi5s210aOFqbgCci-qa_VnyVg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CADSbU_xJ9WoL0zgviwSFhn95yoQgg90_3izCiB-JROO8O4a1_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to