我是angularjs的新手,在处理浏览器后退和前进按钮时遇到了一些问题。
我使用了角度路由来导航到不同的页面。
这是我的代码:
tbApp.config([ '$routeProvider', function($routeProvider) {
$routeProvider.when('/tatm', {`enter code here`
templateUrl : 'PARTIALS/tatm.html',
controller : 'tatm'
}).when('/tobm', {
templateUrl : 'PARTIALS/tobm.html',
controller : 'tobm'
}).when('/pt', {
templateUrl : 'PARTIALS/pt.html',
controller : 'pt'
}).when('/ct', {
templateUrl : 'PARTIALS/ct.html',
controller : 'ct'
}).otherwise({
redirectTo : '/tatm'
});
}]);
没有如何处理浏览器后退和前进按钮.. ?? 任何帮助