erikringsmuth / app-router

Router for Web Components
https://erikringsmuth.github.io/app-router/
MIT License
610 stars 83 forks source link

Add the possibility to select a template by its id in an imported file #93

Closed plequang closed 9 years ago

plequang commented 9 years ago

Hi,

After the discussion about bundling templates in #81, would it be possible to select a template in an imported file by its id ?

Based on your comment https://github.com/erikringsmuth/app-router/issues/81#issuecomment-74425009, this could look like this :

<template id="template1">
</template>
<template id="template2">
</template>

<app-route path="/example" import="/pages/example-page.html" template="template2"></app-route>

I'll create a PR with this implementation, but let me know if you prefer a different one.

Pascal

erikringsmuth commented 9 years ago

Yeah, this sounds good. I'll check out the PR tonight.

erikringsmuth commented 9 years ago

Merged to master! I'll get another release out soon.