Всё работает до момента переименования переменных при минимизации ...
1) Когда заходим в корень приложения http://localhost:8080/, вылетает ошибка Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
App.config([
'$stateProvider',
'$urlRouterProvider',
'$locationProvider',
'localStorageServiceProvider',
function ($stateProvider, $urlRouterProvider, $locationProvider, localStorageServiceProvider) {
_log('App config ...');
$locationProvider.html5Mode(true);
localStorageServiceProvider
.setPrefix('SA');
localStorageServiceProvider
.setStorageType('localStorage');
$urlRouterProvider
.when('/', '/stat')
.when('/stat/','/stat')
.otherwise("/404");
}]);
Наблюдателей за состоянием и прямого его изменения в приложении нет.
Для проверки добавил:
var App = angular.module("app", [
'app.auth', 'app.stat',
'ui.bootstrap', 'ui.router',
'LocalStorageModule', 'ngAnimate',
'angularMoment'
]).run([
'$rootScope', '$state',
'$stateParams', 'amMoment',
function($rootScope, $state, $stateParams, amMoment) {
_log('App run ...');
$rootScope.$on('$stateChangeStart',
function(event, toState, toParams, fromState, fromParams, options) {
_log('$stateChangeStart: ', arguments);
});
amMoment.changeLocale('ru');
$rootScope.$state = $state;
$rootScope.$stateParams = $stateParams;
}
]);
по этому и вижу, что $stateChangeStart отрабатывает 5 раз и выдаёт ошибку ...
2) Если я захожу или обновляю страницу http://localhost:8080/stat
Везде строго придерживаюсь стиля
['inject1', 'inject2', function(inject1, inject2) { /* somecode */ }]
Никаких ошибок в консолях FF и Chrome нет.
при uglify({ mangle: false })
всё работает ...
Ошибка:
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: []
http://errors.angularjs.org/1.4.9/$rootScope/infdig?p0=10&p1=%5B%5D
minErr/<@http://localhost:8080/libs/angular/angular.js?1455281609647:68:12
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://localhost:8080/libs/angular/angular.js?1455281609647:16133:1
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost:8080/libs/angular/angular.js?1455281609647:16359:13
done@http://localhost:8080/libs/angular/angular.js?1455281609647:10791:36
completeRequest@http://localhost:8080/libs/angular/angular.js?1455281609647:10989:7
requestLoaded@http://localhost:8080/libs/angular/angular.js?1455281609647:10930:1
@chrome://firebug/content/lib/wrapper.js:112:43
consoleLog/<@http://localhost:8080/libs/angular/angular.js?1455281609647:12722:18
$ExceptionHandlerProvider/this.$get</<@http://localhost:8080/libs/angular/angular.js?1455281609647:9490:7
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost:8080/libs/angular/angular.js?1455281609647:16361:13
done@http://localhost:8080/libs/angular/angular.js?1455281609647:10791:36
completeRequest@http://localhost:8080/libs/angular/angular.js?1455281609647:10989:7
requestLoaded@http://localhost:8080/libs/angular/angular.js?1455281609647:10930:1
@debugger eval code:1:1
consoleLog/<@http://localhost:8080/libs/angular/angular.js?1455281609647:12722:18
$ExceptionHandlerProvider/this.$get</<@http://localhost:8080/libs/angular/angular.js?1455281609647:9490:7
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost:8080/libs/angular/angular.js?1455281609647:16361:13
bootstrapApply@http://localhost:8080/libs/angular/angular.js?1455281609647:1680:9
invoke@http://localhost:8080/libs/angular/angular.js?1455281609647:4535:14
bootstrap/doBootstrap@http://localhost:8080/libs/angular/angular.js?1455281609647:1678:1
bootstrap@http://localhost:8080/libs/angular/angular.js?1455281609647:1698:1
angularInit@http://localhost:8080/libs/angular/angular.js?1455281609647:1592:5
@http://localhost:8080/libs/angular/angular.js?1455281609647:29652:5
n.Callbacks/j@http://localhost:8080/libs/jquery/dist/jquery.min.js?1455281609647:2:26920
n.Callbacks/k.fireWith@http://localhost:8080/libs/jquery/dist/jquery.min.js?1455281609647:2:27738
.ready@http://localhost:8080/libs/jquery/dist/jquery.min.js?1455281609647:2:29530
I@http://localhost:8080/libs/jquery/dist/jquery.min.js?1455281609647:2:29721
$stateChangeStart:
Object { name="$stateChangeStart", targetScope=Scope, defaultPrevented=false, ещё...}
Object { templateUrl="pages/stat/list/template.html", controller="statListCtrl", name="stat.list", url="" }
Object {}
Object { url="^", abstract=true, name="", views=null }
Object {}
Object { location=false, inherit=true, notify=true, ещё...}
Подскажите в какую сторону смотреть?
.when('/stat/','/stat')