Polymer / polymer

Our original Web Component library.
https://polymer-library.polymer-project.org/
BSD 3-Clause "New" or "Revised" License
22.04k stars 2.02k forks source link

What about the difference between element's attributes & template model? #1232

Closed Colstuwjx closed 9 years ago

Colstuwjx commented 9 years ago

As I known, Polymer element has attributes & template model, such as:

    <polymer-element name="gaea-lib-suicheckbox" attributes="checked inner-tips">
        <template repeat="{{ f in features }}">
    ...

Both this.features & this.inner-tips can be accessed by this, but what's the meaning of attributes & template model?

I just think that attributes are the element's exposed properties which may access or share to other elements, and template model is just used by the element, eg. gaea-lib-suicheckbox itself??

Wishes your reply, many thanks!!

masonlouchart commented 9 years ago

About the attributes you have right. But the template tag is little bit more complicated than what you said. It provides many features. HTML5 Template Tag

tjsavage commented 9 years ago

Closing this issue due to age and the release of version 1 of Polymer - please feel free to re-open if this is incorrect.