<!-- 清除缓存 -->
<meta http-equiv="Cache-Control" content="no-cache,no-store,must-revalidate" />
="Pragma"="no-cache" ="Expires"="0" />
body onLoad="javascript:document.formName.reset()">
app.config(["$stateProvider","$urlRouterProvider",'$locationProvider','$httpProvider',function ($stateProvider,$urlRouterProvider,$locationProvider,$httpProvider) {
if (!$httpProvider.defaults.headers.get) {
$httpProvider.defaults.headers.get = {};
}
$httpProvider.defaults.headers.common["X-Requested-With"] = 'XMLHttpRequest';
$httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache';
$httpProvider.defaults.headers.get['Pragma'] = 'no-cache';
}]);
.state("discountCoupon",{
url: "/discountCoupon"templateUrl: "discountCoupon.html?" + new Date().getTime()cache: false"customerPhone.html?" + Date().getTime(), //随机数
controller: 'customerPhone'
$rootScope.$on('$stateChangeStart',1)">//
路由开始切换
(event,toState,toParams,fromState,fromParams) {
路由开始切换,清除以前所有模板缓存
if (fromState.templateUrl !== undefined) {
$templateCache.remove(fromState.templateUrl);
$templateCache.removeAll();
}
});
$rootScope.$on('$stateChangeSuccess',1)">路由切换完成
路由切换成功,清除上一个页面模板缓存
undefined) {
$templateCache.remove(fromState.templateUrl);
}
});