URL routing without hash

I am trying to make PWA using Ionic2 and I want to use URL based routing in my project.
I already know three ways of routing in Ionic2:

  • Using nav.push which uses stacks.
  • Using setRoot which sets a rootpage.
  • Deeplinker which uses hash feature and is the only way(I know) for URL routing.

Basically, ga doesn’t track a URL after hash in it. So, I just wanted to know if any other possible way is there for routing or ga over routing.

You may config to remove the hash in URL, if that helps.
Reference of doing that:

@maymayw I have already tried this, this way I am facing issue when I am refreshing the same page. Error404 comes.If you have anysolution for that please let me know.

1 Like

I have got the same problem. I hope that someone can solve it.

anybody have a solution for this?

I’ve tried all the method, when the page is refreshing its returning 404

I have done it using Ionic3 Lazy loading and it helped me out in lot many things performance wise. Try it once.

don’t you get 404 or can not get/ when you refresh the page tho?

Nope, I didn’t get 404 error.