[polymer-dev] equivalent to angularjs attribute directive?

2014-04-30 Thread James Campos
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+:

[polymer-dev] equivalent to angularjs attribute directive?

2014-04-30 Thread 'Ian MacLeod' via Polymer
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,

Re: [polymer-dev] equivalent to angularjs attribute directive?

2014-04-30 Thread 'Justin Fagnani' via Polymer
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