Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 AngularJS 项目,我正在使用$routeProvider并$locationProvider根据ngView需要交换部分 DOM。我正在运行 Angular 1.0.6。
$routeProvider
$locationProvider
ngView
但是,当我在我的文档中定义一个链接时,当我单击它时<a href="#!/view2">View 2</a>它会变成它。?q=home/#!/view2
<a href="#!/view2">View 2</a>
?q=home/#!/view2
为什么要添加查询字符串?我怎样才能防止这种情况?