[polymer-dev] equivalent to angularjs attribute directive?
is there a polymer equivalent to angularjs attribute directives? i want to define an 'autosave' attribute, which i can add to arbitrary elements, and will automatically save their contents to local storage. is there a way to do this with polymer? 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 polymer-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/f3b35c62-e908-4128-9daa-77ab08bf12c5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[polymer-dev] equivalent to angularjs attribute directive?
Untested, but I suspect you can pull this off by setting up a base element that defines the autosave attribute and behavior - and have all/most of your custom elements inherithttp://www.polymer-project.org/docs/polymer/polymer.html#extending-other-elementsfrom it On Wed Apr 30 2014 at 2:12:54 PM, James Campos james.r.cam...@gmail.com wrote: is there a polymer equivalent to angularjs attribute directives? i want to define an 'autosave' attribute, which i can add to arbitrary elements, and will automatically save their contents to local storage. is there a way to do this with polymer? 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 polymer-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/f3b35c62-e908-4128-9daa-77ab08bf12c5%40googlegroups.comhttps://groups.google.com/d/msgid/polymer-dev/f3b35c62-e908-4128-9daa-77ab08bf12c5%40googlegroups.com?utm_medium=emailutm_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 polymer-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAKc-BFhPqt2a91yYBFroRA54LFqc0EY8LiunhWad95aGuw35xw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [polymer-dev] equivalent to angularjs attribute directive?
Hi James, I built something similar to Angular directives for Dart called behaviors. It's based on mutation observers and Element.matches and you could pretty easily port it to JavaScript. The repo is here https://github.com/justinfagnani/behaviors.dart An announcement with some details is here: https://plus.google.com/108970026289541541510/posts/EjdR14bA7Dj Cheers, Justin On Apr 30, 2014 4:12 PM, James Campos james.r.cam...@gmail.com wrote: is there a polymer equivalent to angularjs attribute directives? i want to define an 'autosave' attribute, which i can add to arbitrary elements, and will automatically save their contents to local storage. is there a way to do this with polymer? 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 polymer-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/f3b35c62-e908-4128-9daa-77ab08bf12c5%40googlegroups.comhttps://groups.google.com/d/msgid/polymer-dev/f3b35c62-e908-4128-9daa-77ab08bf12c5%40googlegroups.com?utm_medium=emailutm_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 polymer-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAEKsHmBH_g9DeNRY2p7xQ-zwir%3D93uw1H6%2BRegt9W_0uLF%2BFAg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.