We recently started exploring Ionic2/ng2 and so far it looks like it can meet most of our requirements. One issue I’ve been running into and haven’t been able to figure out is routing. In our case, we plan to re-use the code base for desktop browsers as well as device browsers, which means users may want to bookmark certain routes.
For example, our users may likely want to bookmark the following example url: www.my-site-about-trees.com/tree/leaf1
Our plan is to host the ionic2 codebase on AWS S3 and after trying out several different approaches with angular’s PathLocationStrategy and HashLocationStrategy I’m unable to get a bookmark to work correctly. The route is not recognized.
I understand that 1) ng2 routing is still a work in progress, 2) Ionic2 navigation is supposed to be handled via NavController methods (are RouteConfig and LocationStrategy constructs supported in Ionic2?), and 3) a typical situation, the server would need to serve up the index.html page first and then the client side would handle the route, but how do I accomplish this if the code is on S3?
I also explored ng2 AuxRoute, but that doesn’t seem to work either.
Thanks for your help!