Eric, Thanks for the reply :) , but the jsbin link leads to a default jsbin, no code there, just a HTML default template.
Cheers, Sam On Thu, Dec 11, 2014 at 7:31 PM, Eric Bidelman <ebi...@gmail.com> wrote: > That element definition doesn't match your <my-tag > someAttribute></my-tag> declaration. > > You want: http://jsbin.com/?html,output > > On Thu, Dec 11, 2014 at 1:25 PM, Sam Carecho <digiw...@gmail.com> wrote: > >> Eric and fellows, >> >> >> It's not working for me. >> >> I was using javascript's "classList" "add()" and "remove()" methods to >> change the classes of the elements within the shadow DOM. >> After reading this thread I changed my code to use Polymer Expressions, >> but it seems that I'm doing something wrong, >> >> Can you or someone lend a little hand? >> >> Here is my code: >> >> --> the custom element tag: >> >>> <my-tag someAttribute></my-tag> >> >> >> >> --> the custom element definition: >> >>> <polymer-element name="my-tag" attributes="notitle author"> >>> <template> >>> <div id="someId" class="{{ {someClass: someAttribute} | >>> tokenList}}"></div> >>> </template> >>> <script> >>> Polymer({ >>> author: this.author, >>> ready: function() { } >>> }); >>> </script> >>> </polymer-element> >> >> >> >> Thanks, >> Sam >> >> On Thu, Dec 11, 2014 at 6:43 PM, Eric Bidelman <ebi...@gmail.com> wrote: >> >>> The syntax changed, but same general idea: >>> >>> <div class="{{ {active: user.selected, big: user.type == 'super'} | >>> tokenList}}"> >>> >>> https://www.polymer-project.org/docs/polymer/expressions.html#tokenlist >>> >>> On Thu, Dec 11, 2014 at 11:12 AM, <fabr...@gmail.com> wrote: >>> >>>> Hi, >>>> >>>> Just wondering does this solution still work in Polymer version 0.5.1? >>>> I seem to have no luck with it.... >>>> >>>> <div class="{{ active: user.selected}}"> >>>> >>>> >>>> If not, could someone tell me the correct way to approach this? >>>> >>>> Thanks, Willem >>>> >>>> >>>> >>>> >>>> On Monday, June 24, 2013 3:59:03 PM UTC+1, Eric Bidelman wrote: >>>>> >>>>> No problem. There's lot-o-good stuff in there. >>>>> >>>>> I've added >>>>> <https://github.com/Polymer/mdv/commit/4d4966dce26da9c7168d5d9359b05c1f18e62206> >>>>> a link from the main MDV docs to the Expression Syntax doc. >>>>> Hopefully it will be easier to find next time we publish docs. >>>>> >>>>> >>>>> On Mon, Jun 24, 2013 at 7:54 AM, Martijn Faassen < >>>>> faa...@startifact.com> wrote: >>>>> >>>>>> Hi Eric, >>>>>> >>>>>> Thanks, I should read that document carefully. That looks like a nice >>>>>> solution! >>>>>> >>>>>> I see it also answers a question I had about accessing an outer scope >>>>>> object in an inner scope. Awesome! >>>>>> >>>>>> Regards, >>>>>> >>>>>> Martijn >>>>>> >>>>> >>>>> 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/e0b3f7e7-2b3c-446d-bebd-e00f926b46d9%40googlegroups.com >>>> <https://groups.google.com/d/msgid/polymer-dev/e0b3f7e7-2b3c-446d-bebd-e00f926b46d9%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 polymer-dev+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/polymer-dev/CACGqRCBSV%2Bagg3nErKYDL1%3Dhk61MCZ1OM9%2Bm3%3D9s76BLpOz%3D%3DA%40mail.gmail.com >>> <https://groups.google.com/d/msgid/polymer-dev/CACGqRCBSV%2Bagg3nErKYDL1%3Dhk61MCZ1OM9%2Bm3%3D9s76BLpOz%3D%3DA%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 polymer-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAEhtDsgbi1Pkua15HR-J%3DchZRM-BK2%3DnfbiPL6J5ozMdq5hHRA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.