erikringsmuth / app-router

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

Startup route #138

Open MaciejHanajczyk opened 8 years ago

MaciejHanajczyk commented 8 years ago

Hi, how to configure a default/startup route on app-router in html?

Is there a 'active' or 'default' property on app-router element which sets that?

byrnane commented 8 years ago

Hi, @MaciejHanajczyk. To create default state use something like this:

<app-router>
    <app-route path="/" redirect="/home"></app-route>
    <app-route path="/home" import="home-page.html"></app-route>
    <!-- Another pages here -->
    <app-route path="*" import="not-found-page.html"></app-route>
</app-router>
MaciejHanajczyk commented 8 years ago

Thanks for Your reply. I will give it a try.