I'm using Polymer for an app and using Erik Ringsmuth's app-router for routing. The code is as follows:
In index.html:
<app-router mode="pushstate">
<app-route path="/" import="/elements/login-page/login-page.html"></app-route>
<app-route path="/dash" import="/elements/dash-page/dash-page.html"></app-route>
<app-route path="/new" import="/elements/newapp-page/newapp-page.html"></app-route>
<app-route path="*" import="/elements/dash-page/dash-page.html"></app-route>
</app-router>
In login-page.html:
<link rel="import" href="../../../bower_components/polymer/polymer.html">
<polymer-element name="login-page" attributes="">
<template>
<link rel="stylesheet" href="login-page.css">
<section vertical layout center-center>
<h1>Login with:</h1>
<fire-login provider="github"></fire-login>
<fire-login provider="facebook"></fire-login>
</section>
</template>
</polymer-element>
The other pages are similar. Everything works fine out of the box but when I refresh any of the pages I get a Cannot GET /dash
or Cannot GET /new
. Going back to the root path and refreshing gets everything going again.
I can't figure out why refreshing doesn't work.