'use strict'; /** * @ngdoc function * @name netvueApp.controller:MainCtrl * @description * # MainCtrl * Controller of the netvueApp */ angular.module('netvueApp') .controller('MainCtrl', ['$scope', '$location', '$cookieStore', function ($scope, $location, $cookieStore) { $scope.onLocaleChange = function() { console.log('val=' + $scope.locale); $scope.$emit('changeLocale', $scope.locale); }; $scope.LocaleList = LocaleList; var loc = $location.search().loc; console.log('loc=' + loc); $scope.locale = $cookieStore.get('lang') || loc || defaultLocal; }]);