Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template directives do not function on template in polymer-element #703

Closed
sorvell opened this issue Aug 12, 2014 · 3 comments
Closed

Template directives do not function on template in polymer-element #703

sorvell opened this issue Aug 12, 2014 · 3 comments

Comments

@sorvell
Copy link
Contributor

sorvell commented Aug 12, 2014

Given:

 <polymer-element name="my-element">
   <template if="{{stuff}}">
   </template>
   ...
 </polymer-element>

The if direction here is ignored. Likewise other template directives repeat and bind are ignored.

This has been a source of confusion for users. Polymer should either (1) warn if these directives are used where they will not apply or (2) wrap the template to make this work.

@sorvell sorvell self-assigned this Aug 12, 2014
@addyosmani
Copy link
Member

Is there a large implicit cost to (2)? (easier for users, but (1) isn't too bad of they know to watch for warnings)

@rafaelw
Copy link
Contributor

rafaelw commented Aug 12, 2014

Another variant would be something more explicit which controls the lifecycle of element. IOW, don't continue boot-up until a given data value is available. I've seen lots of code with filters on the element impl which has to check for bogus values being handed in because it gets run before the element has received any real data.

@tjsavage
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants