erikringsmuth/app-router

Allow vulcanizing without having to specify the element attribute

Open

#22 opened on Sep 12, 2014

View on GitHub
 (9 comments) (0 reactions) (0 assignees)HTML (608 stars) (83 forks)batch import
(・_・ヾbughelp wanted

Description

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!

Contributor guide