You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use time-elements in an application built on top of Polymer (2.0) and Web Components and I can't seem to get this to work since there is no real web component defined for these custom HTML tags. I know this is added to the Web Components website but it only has the .js file and no HTML files to import. My request is two-fold:
Make full-blown Web Components for each custom HTML tag (eg. <relative-time>, <local-time>, etc.) with HTML imports.
Is there a way to properly use the current implementation in a Polymer 2.0 Web Component?
Thank you for your work!
Edit: I forgot to mention that I'm relatively new to Web Components and Polymer so it's very possible that I'm missing something and time-elements in its current form is already a real web component and I just don't realize it.
The text was updated successfully, but these errors were encountered:
After some searching I found out what my problem was from Issue #54 . Apparently Polymer was not binding my variable to the datetime attribute because I wasn't using the attribute binding syntax of $= instead of just the =. So, in my case I needed to use something like datetime$=[[bindingVariable]] and that worked.
As for where to reference the time-elements.js, I was able to include it in my top-level Web Component component and it found my <relative-time> tag inside a child Web Component. I wasn't sure that would work, but that's because I'm still learning Web Components.
So, I've resolved point 2 above, but it would still be really helpful to create real HTML imports instead of having to import the script directly.
I'm trying to use time-elements in an application built on top of Polymer (2.0) and Web Components and I can't seem to get this to work since there is no real web component defined for these custom HTML tags. I know this is added to the Web Components website but it only has the .js file and no HTML files to import. My request is two-fold:
<relative-time>
,<local-time>
, etc.) with HTML imports.Thank you for your work!
Edit: I forgot to mention that I'm relatively new to Web Components and Polymer so it's very possible that I'm missing something and time-elements in its current form is already a real web component and I just don't realize it.
The text was updated successfully, but these errors were encountered: