2

Attribute(s) for a polymer element can be defined as attributes="toggle-foo", defaulted within the Polymer definition as 'toggle-foo':false and used elsewhere in the Polymer definition like if( this['toggle-foo'] ){...}. How can hyphenated attribute names be used within the template?

I have tried the following:
<template if="{{toggle-foo}}">
<template if="{{this['toggle-foo']}}">
<template if="{{'toggle-foo'}}">

RogerSmith
  • 204
  • 4
  • 11
  • 2
    We recommend non-hypen properties because you can also define `Changed` handlers: http://www.polymer-project.org/docs/polymer/polymer.html#observeprops – ebidel Jul 03 '14 at 19:30

0 Answers0