﻿angular.module('emixApp',
    ['ngRoute',
    'emixApp.controllers',
    'emixApp.directives',
    'emixApp.services',
    'mgcrea.ngStrap',
    'ngMorris',
    //'ngGoogleMap'
    'pascalprecht.translate'
    ])
    .config(['$routeProvider', function ($routeProvider) {

        $routeProvider
            .when('/dashboard', {
                controller: 'dashboard_index',
                templateUrl: 'ngApp/pages/dashboard/index.html'
            })
            .when('/section', {
                controller: 'section_index',
                templateUrl: 'ngApp/pages/section/index.html'
            })
            .otherwise({
                redirectTo: '/dashboard'
            });

    }])
    .config(['$translateProvider', function ($translateProvider) {

        $translateProvider.useStaticFilesLoader({
            prefix: Emix.Web.translationsFolder,
            suffix: '.json'
        });

        $translateProvider.preferredLanguage('it_IT');
        
        $translateProvider.storageKey('lang');
        $translateProvider.storagePrefix('emix');

        // $translateProvider.useLocalStorage();
    }]);

angular.module('emixApp.services', []);
angular.module('emixApp.controllers', []);
angular.module('emixApp.directives', []);

@@ -36,16 +36,33 @@
 Route',%0A
+    'ngCookies',%0A
     'emi
@@ -172,28 +172,8 @@
 s',%0A
-    //'ngGoogleMap'%0A
     
@@ -1065,19 +1065,15 @@
 ');%0A
-%0A
        
- //
  $tr

Allow translator plugin to store selected language in sessionStorage/cookie and remember the settings