While in Polymer directly it has some troubles, webpack actually gives some
options for that: https://github.com/webpack-contrib/html-loader
Or alternatively you could use lazy dynamic content loading via
EPA-WG/embed-page
static get template()
{
return html`<embed-page src="templateA.html" scope="none" ></embed-page>`;
}
On Wednesday, September 5, 2018 at 1:35:39 AM UTC-7, [email protected]
wrote:
>
> Hi there,
>
> i'm still confused. I try to extract the html template from my polymer
> component into a standalone html file. For polymer 2 i found some examples,
> but they don't work for my polymer 3 project. I tried something like the
> following, but it fails.
>
> import * as template from './pm.template.html';
>
> ....
>
> static get template() {
> return template;
> }
>
>
>
> So as simple question, it is possible to separate the template as html
> file (not a js file) & if yes, how?
>
> Thanks for your help
>
> ciao Torsten
>
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/4071ec8d-0074-46f8-8a6b-462d5d370f7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.