Angular 怎么在加载中加入 Loading 提示框

2025-05-17 02:15:55
推荐回答(1个)
回答1:

angular.module('APP', [
'ngRoute',
...
]).
config(function ($routeProvider, $locationProvider) {
$routeProvider.
when('/xxxx', {templateUrl: 'view/xxxx.html', controller: 'xxx'});
when('/xxxx', {templateUrl: 'view/xxxx.html', controller: 'xxx'});
$locationProvider.hashPrefix('!');
}).run(function(){
//run block
});
换个问法,如何在这些view切换中加入loading。