Route not working if not basic url polymer

65 views Asked by At

i am using this tutorial to use routes in polymer 2, i am setting route, and it's working fine when i run the standard url... For example: testurl.com (this works) After that, every single page i go add path to route with no problem. Example: testurl.com/product/123

My problem is now, if i refresh this page (testurl.com/product/123) not works more, my site loads, loads, loads, and not run...

I tried to configure my app-route like this

<app-location
  route="{{route}}">
</app-location>

<app-route
  route="{{route}}"
  pattern="/:page"
  data="{{routeData}}"
  tail="{{subroute}}">
</app-route>

<app-route
  route="{{subroute}}"
  pattern="/:idProduct"
  data="{{subrouteData}}">
</app-route>

This is how i am setting route

this.set('route.path', '/product/' + id);

Now i don't know how make a constructed url works normally, i don't know what i'm making wrong... Using iron-pages too, and not having problem setting change of pages too, only in routes with content after basic url.

0

There are 0 answers