That's actually one of the syntactic sugar CoffeeScript provides — object declarations may be done without curly braces, and indentation is meaningful. I've simplified this example before posting it here but other bindings declared in my element are working, just this one seems to be ignored.
To check if this wasn't an issue with this property, I've tried binding the form's action to another property and the same thing happened. I'm starting to wonder if this has something to do with Rails – I could totally see the framework altering the HTML output and running some processing on <form> elements, to the point that Polymer can no longer bind on the client side. -j On Mon, Jun 29, 2015 at 3:36 PM <[email protected]> wrote: > I didn't understand coffeescript, but did notice one issue in your script, > you need to pass in an object to Polymer function, and properties also > needs to be an object. Please notice the four added curly braces. > > MyCustomElement = Polymer( { > is: 'my-custom-element', > properties: { > formAction: String > } > } ) > > > On Monday, June 29, 2015 at 4:52:46 PM UTC-5, Julien Silland wrote: >> >> Is this something that should work? I can't seem to get it to work — >> here's a simplified version of my element: >> >> In my document: >> <my-custom-element >> form-action="#{populate_orders_path}"></my-custom-element> >> >> (The populate_orders_path is defined by my Rails server and returns >> "/store/orders/populate") >> >> Element definition: >> <dom-module id="my-custom-element"> >> <template> >> <form action="{{formAction}}"> >> … >> </form> >> </template> >> <script src="MyCustomElement.js"></script> >> </dom-module> >> >> JS (Coffeescript, really, but eh): >> MyCustomElement = Polymer( >> is: 'my-custom-element', >> properties: >> formAction: String >> ) >> >> In the browser, the form element is invariably rendered with an action of >> "http://localhost:4000/store/assets/%7B%7BformAction%7D%7D". In the >> debugger, I can see the formAction property correctly being set to the >> expected value. Other bindings and properties work fine, this appears to be >> specific to this tag/attribute. >> >> Any help appreciated, >> -j >> >> >> > 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/b14df3d9-35a4-43a9-ae2f-ea4e3ba64bae%40googlegroups.com > <https://groups.google.com/d/msgid/polymer-dev/b14df3d9-35a4-43a9-ae2f-ea4e3ba64bae%40googlegroups.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/CAKyYh8CEt48r293D7SiA-tv-gP8hRCmkazKN_cC%2BgRA5EaiOsw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
