erikringsmuth/app-router

Allow vulcanizing without having to specify the element attribute

Open

#22 aperta il 12 set 2014

Vedi su GitHub
 (9 commenti) (0 reazioni) (0 assegnatari)HTML (83 fork)batch import
(・_・ヾbughelp wanted

Metriche repository

Star
 (608 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Just a minor thing, it seems the element tag needs to be set for an imported component for vulcanizing to work even if the imported component has the same name as the file.

For example, I have a component in a file name home-page.html exported with a name of 'home-page'.

This code:

<app-route path="/" import="components/home-page.html"></app-route>

Results in polymer throwing an error when loaded after vulcanization:

Uncaught HierarchyRequestError: Failed to execute 'appendChild' on 'Node': Nodes of type 'HTML' may not be inserted inside nodes of type '#document'.

This code fixes it:

<app-route path="/" import="components/home-page.html" element="home-page"></app-route>

Cheers!

Guida contributor