简体   繁体   English

如何禁用angularjs中的深度链接?

[英]How to disable deeplinking in angularjs?

I am now trying to implement a page with Angularjs. 我现在正在尝试使用Angularjs实现页面。 But the problem is that the behaviour of the anchor element in the page seems to be overrided by Angularjs. 但是问题在于,Angularjs似乎覆盖了页面中锚元素的行为。

So for the below anchor element, I just want to present a link for the user to go to the destination. 因此,对于下面的锚元素,我只想提供一个链接,供用户转到目的地。

<a href="payment/123">Pay!</a>

So I just want to direct the user to the page at payment/123 . 因此,我只想将用户定向到payment/123处的页面。 But if I click on the link now, it just try to come out with a new url by adding the link in href to the current url. 但是,如果我现在单击链接,它只是尝试通过将href的链接添加到当前URL来提供一个新的URL。 Say eg if the current url is http://www.example.com/shopping , then it tries to direct me to http://www.example.com/shopping/#/payment/123 but not what I want ( http://www.example.com/payment/123 ). 例如,如果当前网址是http://www.example.com/shopping ,那么它将尝试将我定向到http://www.example.com/shopping/#/payment/123而不是我想要的( http://www.example.com/payment/123 )。

Any idea how I can solve this? 知道我该如何解决吗?

That was a bug with rc11 and rc12. 那是rc11和rc12的错误。 Try 1.0.0 final. 最终尝试1.0.0。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM