“deferIntercept”
感觉这个东西对我有帮助,看文档不是很透彻。
有没有通俗一点的介绍,或demo 谢谢
The following is the normal writing method. . .
App.config(function ($stateProvider, $urlRouterProvider) { // $urlRouterProvider.deferIntercept(); $urlRouterProvider.otherwise('/view/index'); $stateProvider .state('Home', { url: '/view/index', templateUrl: 'view/index.html' }) .state('Error', { url: '/view/error', templateUrl: 'view/error.html' }) });
If you add $urlRouterProvider.deferIntercept(), both the default route and the redirected route will be disabled. This is why the official website says to prevent URL jumps~
The following is the normal writing method. . .
If you add $urlRouterProvider.deferIntercept(), both the default route and the redirected route will be disabled. This is why the official website says to prevent URL jumps~