这可能是许多问题:本质上是routeProvider找不到文件并递归加载默认值的问题。
对我来说,导致问题的原因不是缩小,而是js的串联。
angular.module('myApp').config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/', { templateUrl: 'views/listing.html', controller: 'ListingCtrl' }) .otherwise({ redirectTo: '/' }); }]).constant('FIREbase_URL', 'something');您会注意到,如果应用程序找不到文件(即
otherwise),则它将重定向到根目录,在这种情况下将加载
templateUrl。但是,如果您
templateUrl错了,那么它将导致递归,从而
index.html一遍又一遍地重新加载角度加载。
就我而言,grunt-concat导致templateUrl在构建后而不是在构建之前是错误的。



