How to create ng template type web component using lit dev #3383
Replies: 2 comments 2 replies
-
Are you referring to Angular's |
Beta Was this translation helpful? Give feedback.
-
Can you simply not make an lit template and just not render it? e.g. https://lit.dev/playground/#gist=b343c3c7856d1b503aeaccdba64e7ea7 You can wrap this in a web component if you wish, but we highly advise AGAINST this pattern because you will generate a node even if it's not rendered. We used to do this in the Polymer library back in the day. There is a proposal for native template instantiation as well: https://github.com/WICG/webcomponents/blob/gh-pages/proposals/Template-Instantiation.md but in the meantime if you'd like that you might want to consider a library like Stampino: |
Beta Was this translation helpful? Give feedback.
-
I want to create ng template type component Like:
My question is how we can parse it? In angular we can parse it like ${item.firstName}, but in web component how I can parse such of template ? template content will be dynamic. Is there is approach so parse this template.
In simple work can I use string interpolation ? like ?
Any suggestion?
Thanks,
Jitendra Prajapati
Beta Was this translation helpful? Give feedback.
All reactions