"use strict";
define(['root','directives','settings','angularAMD','angular-route', 'angular-cookies', 'ui-bootstrap','ui.tree'], 
function (root,directives,settings,angularAMD) {
    var app = angular.module("mainModule", 
        ['ngRoute', 'ngCookies', 'ui.bootstrap','ui.tree']);
          
    app.config(['$routeProvider', function ($routeProvider) {
   
    $routeProvider

    .when("/", angularAMD.route({
        templateUrl: function (rp) {
			return settings.VIEWS_DIRECTORY+'/pages/home.html';
		},
		controllerUrl: settings.CTRLS_DIRECTORY+"/page_controller"            
    }))
	
	.when("/pages/:page",angularAMD.route({
		templateUrl: function (rp) {
			return settings.VIEWS_DIRECTORY+'/pages/'+rp.page+'.'+settings.VIEW_EXTENSION;
		},
		controllerUrl:  settings.CTRLS_DIRECTORY+"/page_controller"      
	}))
	
	.when("/:controller/:action", angularAMD.route({
        templateUrl: function (rp) { 
			if(!rp.action)  rp.action ='index';
			return settings.VIEWS_DIRECTORY+'/' + rp.controller + '/' + rp.action +'.'+settings.VIEW_EXTENSION;
		},
        resolve: {
        load: ['$q', '$rootScope', '$location', 
            function ($q, $rootScope, $location) {
                var path = $location.path();
                var parsePath = path.split("/");
				var controllerName = parsePath[1];
                var loadController =  settings.CTRLS_DIRECTORY+"/"  + 
                                      controllerName + "_controller";
                var deferred = $q.defer();
                require([loadController], function () {
                    $rootScope.$apply(function () {
                        deferred.resolve();
                        });
            });
            return deferred.promise;
            }]
            }
        }))
        .otherwise({ redirectTo: '/' }) 
    }]);                
	app.config(['$uibModalProvider', function($uibModalProvider) {
		$uibModalProvider.options = {
		  backdrop: 'static',
		};
	  }]);
	 app.config(['$provide', function($provide) {
		$provide.decorator('$locale', ['$delegate', function($delegate) {
			console.log($delegate.id);
			$delegate.NUMBER_FORMATS.PATTERNS[1].negPre = '(\u00A4';
			$delegate.NUMBER_FORMATS.PATTERNS[1].negSuf = ')';
			$delegate.NUMBER_FORMATS.CURRENCY_SYM = '';
		  
		  return $delegate;
		}]);
	  }]);
	//Bootstrap RootController
	app.controller('RootController', root);
	//Bootstrap Directives
	for(var drctv in directives)
		app.directive(drctv, directives[drctv]);
    // Bootstrap Angular when DOM is ready
    angularAMD.bootstrap(app);
	
	app.settings =  settings;
  
    return app;
});
@@ -277,27 +277,16 @@
 ree'%5D);%0A
-          %0A
     app.
@@ -1955,16 +1955,125 @@
 %09  %7D%5D);%0A
+%09app.config(%5B'$logProvider', function($logProvider)%7B%0A%09%09$logProvider.debugEnabled(settings.DEBUG_MODE);%0A%09%7D%5D);%0A
 %09 app.co

Implement logProvider flag on app config