0

We are building an application using multiple single-page apps to keep things small, but run into a problem of building links between pages.

Let's say we have to pages equipment.html and maintenance.html

Both are independent SPA apps each with their own client side roting tables Right now we have client side routing with page.js using #!

On the equipment page we place a link <a href="/maintenance.html#!/show/350">Show Maintenance</a>

Hovering over the link shows http://localhost/maintenance.html#!/show/350 but when we click on the links it goes to http://localhost/equipment.html#!/maintenance.html#!/show/350 which does not take us anywhere. Now, clicking second time on the link takes us to the right page. Any way to solve this?

Thanks

Shreko
  • 321
  • 4
  • 16
  • 1
    As I haven't received any answers, I'm posting a workaround: Switching to director.js solved the problem. Not sure if it's a bug in page.js or we were missing something in the page.js configuration? – Shreko Jan 24 '15 at 20:23
  • Same problem here. Not sure if I want to switch the library. Would you recomend some more source on solving this problem with director.js? Thank you! – taiar Mar 09 '15 at 20:05
  • I really wanted to use page.js, but it did not work in my case, while director.js did. It was just straight forward switch to the new library. If director.js docs are not enough to get you going take a look at miki, a small project that uses it. https://github.com/ryanramage/miki – Shreko Mar 11 '15 at 18:15
  • Saw a similar issue with another router, and it came down to configuring the router to properly recognize the root ie "/" whether you're in a sub-route. So for anyone with this issue, maybe start your research in that direction. – Kalnode Dec 13 '17 at 13:44

0 Answers0