角JS:如何在页面中设置相同的URL ?

时间:2021-12-14 14:04:34

I want to set default URL for all my page in my web(eg. www.bola.com), so user will only see this URL for the entire time. And if user refresh the page, it will be back to default homepage. (I'm using Angular Js + Ionic Framework)

我想在我的网页中设置所有页面的默认URL(如。(www.bola.com),所以用户只会看到这个URL。如果用户刷新页面,它将返回默认主页。(我使用的是角Js +离子框架)

Thanks.

谢谢。

1 个解决方案

#1


2  

One solution is using ui-router instead of ng-rote and not assigning urls to your states.

一个解决方案是使用ui-router代替ng-rote,而不是将url分配给您的状态。

Then use <a ui-sref="some.state">Click</a>, to change state and the url field is not updated.

然后使用< ui-sref = "一些。状态">点击,改变状态,url字段未更新。

#1


2  

One solution is using ui-router instead of ng-rote and not assigning urls to your states.

一个解决方案是使用ui-router代替ng-rote,而不是将url分配给您的状态。

Then use <a ui-sref="some.state">Click</a>, to change state and the url field is not updated.

然后使用< ui-sref = "一些。状态">点击,改变状态,url字段未更新。