templating
templating copied to clipboard
vanilah web component templates
We have several scenarios where we have custom elements using vanilla web components that do not have a template. The current work around is to just use a empty template so that during the loading process we don't get a error indicating that there must be a template.
Template loading for vanilla web components sound not enforce the presence of a template. We use this for d3 visualisations where we build up the UI manually.
This issue affects us greatly and we would appreciate any assistance to avoid having to use a empty template tag as that affects content elements.
Does @noView() fit your case?
since these are frameworkless components using Aurelia framework in it defeats the purpose. Where in the code base might I find the implementation of @noView perhaps I can find some clues in there
You can do
export class Ce {
static $view = null
}
Its a new feature and will take a bit time to get released
@pragmaproducts you lost me, are you wrapping those vanilla components in Aurelia ones or?
@pragmaproducts @noView https://github.com/aurelia/templating/blob/2f0738217e289e70dd2f9f60c56d413cffb3a93a/src/decorators.js#L230
I guess its the combination of Aurelia life cycle and webcomponent, so the element needs to be registered with both aurelia and customElements registry