You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

17 lines
486 B

angular.module('app.settings', ['pascalprecht.translate'])
.controller('SettingsCtrl', function($scope, $stateParams, $translate) {
if(localStorage.getItem('lang'))//initialization
{
$scope.lang=localStorage.getItem('lang');
}else{
localStorage.setItem('lang', 'english');
$scope.lang=localStorage.getItem('lang');
}
$scope.langChange = function(lang){
console.log(lang);
window.localStorage.setItem('lang', lang);
$translate.use(lang);
};
});