我目前正試圖設置一個表,當您單擊一行時轉到配置文件頁面。但$ location.url會簡單地將'profile.html'附加到當前html頁面的末尾,而不會將我帶到配置文件頁面。如何更改當前網址以允許我訪問我的網頁。
指數HTML:
http://localhost:9080/AgentOnlineApp/index.html
HTML當我點擊該行我得到:
http://localhost:9080/AgentOnlineApp/index.html#/profile.html
我想:
http://localhost:9080/AgentOnlineApp/profile.html
當前AngularJS代碼:
$scope.selectTableRow = function(agent)
{
$location.url('/profile.html');
}