mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-15 16:40:27 +01:00
Disable Angular debug data in production for a significant performance boost. Passes environment variable from template to app config and from there to Angular bootstrap config. https://docs.angularjs.org/guide/production#disabling-debug-data See #1294
24 lines
724 B
JavaScript
24 lines
724 B
JavaScript
(function (window) {
|
|
'use strict';
|
|
|
|
var applicationModuleName = 'mean';
|
|
|
|
var service = {
|
|
applicationEnvironment: window.env,
|
|
applicationModuleName: applicationModuleName,
|
|
applicationModuleVendorDependencies: ['ngResource', 'ngAnimate', 'ngMessages', 'ui.router', 'ui.bootstrap', 'ngFileUpload', 'ngImgCrop'],
|
|
registerModule: registerModule
|
|
};
|
|
|
|
window.ApplicationConfiguration = service;
|
|
|
|
// Add a new vertical module
|
|
function registerModule(moduleName, dependencies) {
|
|
// Create angular module
|
|
angular.module(moduleName, dependencies || []);
|
|
|
|
// Add the module to the AngularJS configuration file
|
|
angular.module(applicationModuleName).requires.push(moduleName);
|
|
}
|
|
}(window));
|