Roberto Sánchez
2014-01-16 8f97df85eefe4d648f2002b8d68818ef6020c2df
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(function() {
   'use strict';
   
   var m = angular.module('securis', [ 'ngRoute', 'ngResource', 'toaster', 'localytics.directives', 'catalogs', 'i18n' ]);
   
   m.config(function($routeProvider, $locationProvider) {
       console.log('Configuring routes...');
           $routeProvider.when('/login', {
             templateUrl: 'login.html',
             controller: 'LoginCtrl',
             controllerAs: 'login'
           });
           $routeProvider.when('/licenses', {
                 templateUrl: 'licenses.html',
                 controller: 'LicensesCtrl',
                 controllerAs: 'licenses'
           });
           $routeProvider.when('/admin', {
                 templateUrl: 'admin.html',
                 controller: 'AdminCtrl',
                 controllerAs: 'admin'
           });
        
           // configure html5 to get links working on jsfiddle
           $locationProvider.html5Mode(true);
       });    
   m.controller('MainCtrl', ['$scope', '$location', '$L',
                                function($scope, $location, $L) {
       console.log('Moving to login...');
       console.log('Test 1 lang: ' + 'Hello {0}!! this is {1}'.$i18n('World', 'cool'));
       console.log('Test 2 lang: ' + $L.get('Hello Pepe!!'));
       $location.path('/login');
       }]);    
       
   
})();