(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'); }]); })();