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

vanilah web component templates #621

Open
pragmaproducts opened this issue May 24, 2018 · 6 comments
Open

vanilah web component templates #621

pragmaproducts opened this issue May 24, 2018 · 6 comments

Comments

@pragmaproducts
Copy link

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.

@StrahilKazlachev
Copy link
Contributor

Does @noView() fit your case?

@pragmaproducts
Copy link
Author

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

@bigopon
Copy link
Member

bigopon commented May 25, 2018

You can do

export class Ce {
  static $view = null
}

Its a new feature and will take a bit time to get released

@StrahilKazlachev
Copy link
Contributor

@pragmaproducts you lost me, are you wrapping those vanilla components in Aurelia ones or?

@doktordirk
Copy link

@pragmaproducts
@noview

export function noView(targetOrDependencies?:Function|Array<any>, dependencyBaseUrl?:string): any {

@bigopon
Copy link
Member

bigopon commented May 25, 2018

I guess its the combination of Aurelia life cycle and webcomponent, so the element needs to be registered with both aurelia and customElements registry

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

No branches or pull requests

4 participants