'use strict'; /** * @ngdoc function * @name netvueApp.controller:FooterCtrl * @description * # FooterCtrl * Controller of the netvueApp */ angular.module('netvueApp') .controller('FooterCtrl', ['$scope', '$location', '$cookieStore', '$rootScope', function ($scope, $location, $cookieStore, $rootScope) { $scope.showDownloadModal = false; $rootScope.$on('changeLocale', function(event, param) { param = param || defaultLocal; if (AllLang[param]) { $rootScope.lang = AllLang[param]; $rootScope.locale = param; } else { $rootScope.lang = AllLang[defaultLocal]; $rootScope.locale = defaultLocal; } $cookieStore.put('lang', $rootScope.locale); }); $rootScope.$on('showDownloadModal', function(event) { $scope.showDownloadModal = true; }); var loc = $location.search().loc; if ($rootScope.lang === undefined) { console.log($cookieStore.get('lang')); $scope.$emit('changeLocale', $cookieStore.get('lang') || loc || defaultLocal); } }]);