在两个不同的spa页面之间使用page.js进行客户端路由

问题描述 投票:0回答:0

我们正在使用多个单页应用程序来构建应用程序,以使内容变小,但会遇到在页面之间构建链接的问题。

假设我们必须要翻页equipment.html和maintenance.html

两者都是独立的SPA应用程序,每个应用程序都有自己的客户端路由表。现在,我们使用#!通过page.js进行客户端路由!

在设备页面上,我们放置一个链接<a href="/maintenance.html#!/show/350">Show Maintenance</a>

将鼠标悬停在链接上会显示http://localhost/maintenance.html#!/ show / 350,但是当我们单击链接时,它将转到http://localhost/equipment.html#!/maintenance.html#!/ show / 350不会带我们到任何地方。 现在,第二次单击链接会将我们带到正确的页面。 有什么办法解决这个问题?

谢谢

javascript url-routing page.js
© www.soinside.com 2019 - 2024. All rights reserved.