在点击超链接时,url会在angularjs中更改

时间:2017-04-23 13:16:08

标签: angularjs ngroute

我在我的应用中使用ngRoute并点击了这样的超链接

ExecutionContext

值变为

SynchronizationContext

而不是

<a href="/student/{{student.id}}">{{student.name}}</a> 

路线提供者代码

http://localhost/student/1 

为什么会这样,以及如何解决它。

1 个答案:

答案 0 :(得分:0)

<a href="/student/{{student.id}}">{{student.name}}</a>

当你开始/你重定向到root女巫是localhost你删除/

你需要从#

开始

https://www.w3schools.com/angular/angular_routing.asp