I recently developed an app using the Yeoman scaffolded app (specifically, the Angular Fullstack generator).
While grunt serve
works perfectly fine, I encountered a problem when running grunt build
which results in the distribution locking up memory. This issue is likely caused by circular references within Angular.
To address this, I decided to upgrade Angular to version 1.2.15
, but now I'm facing a new error message:
WARNING: Tried to Load Angular More Than Once
Prior to the upgrade, I was getting the following error:
Error: 10 $digest() iterations reached. Aborting!
The debugging process has been challenging as the error only surfaces after the build and minification process. Despite ensuring that all my modules are in Angular's array format to prevent DI issues during minification, the problem persists.
No single script seems to be causing this issue - the only workaround I've found is to not initialize with my app.js file. For reference, here is the content of my app.js file:
'use strict';
angular.module('myApp', [
'ngCookies',
'ngResource',
'ngSanitize',
'ngRoute',
'ngTagsInput',
'ui.bootstrap',
'google-maps',
'firebase'
]);
angular.module('myApp').config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/listing.html',
controller: 'ListingCtrl'
})
.otherwise({
redirectTo: '/'
});
}]).constant('FIREBASE_URL', 'something');