|
/**
* @ngdoc function
* @name domainManagerApp.controller:AboutCtrl
* @description
* # AboutCtrl
* Controller of the domainManagerApp
*/
angular.module('goApp.index', ['famous.angular', 'ngFx', 'ngAnimate'])
.controller('IndexController',['$scope', '$rootScope', '$famous', '$timeline', '$mixpanel', 'Data', function ($scope, $rootScope, $famous, $timeline, $mixpanel, Data) {
'use strict';
$mixpanel.track('Page View', { "Page": "index" });
console.log(">>> Select Language");
$scope.view_set_lang = false;
if(!Data.isLangSet()) {
$scope.view_set_lang = true;
} else {
$scope.view_set_lang = false;
}
$scope.btnSelectLang = function(lang){
console.log('btn pressed');
switch(lang) {
case 'pt-BR':
Data.setLang(0);
console.log("> Selected Portuguese as default language");
break;
case 'en':
Data.setLang(1);
console.log("> Selected English as default language");
break;
}
$scope.view_set_lang = false;
};
}]);
|