1
我使用J-Query Mobile
和AngularJS
,并且在我要导航用户到不同页面的按压链接上导航,但地址栏中的url地址不会更改如何解决此问题。我是个使用单页结构以编程方式浏览页面,但地址栏URL不更改
HTML部分
<a href="" ng-controller="addFoodToLog" ng-click="go()" data-role="button">Add To Log</a>
JS部分
var myApp = angular.module('myApp',[]);
myApp.controller('addFoodToLog',function($scope){
$scope.go = function() {
//Here Selected Food Bump In Food Log
alert("Successfully Add In Your Log");
$.mobile.changePage('index.html#foodscreen');
}
});
有人问它
之前http://stackoverflow.com/questions/7824243/jquery-mobile-mvc-getting-the-browser-url-to-change-with-redirecttoaction 你必须禁用移动阿贾克斯。看链接。 – Dvir
其中我禁用移动阿贾克斯 – Blu
@Dvir 我补充说,但没有效果 Add To Log – Blu