erikringsmuth/app-router

Allow vulcanizing without having to specify the element attribute

Open

#22 opened on 2014年9月12日

GitHub で見る
 (9 comments) (0 reactions) (0 assignees)HTML (83 forks)batch import
(・_・ヾbughelp wanted

Repository metrics

Stars
 (608 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

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!

コントリビューターガイド