Demo entry 1958448

config.js

   

Submitted by anonymous on Jun 19, 2015 at 13:35
Language: JavaScript. Code size: 608 Bytes.

$rootScope.$on('$stateChangeStart', function(event, toState, toParams) {
         var lang = toParams.locale;
         var isRtl;
         var activeLanguage;

         switch (lang) {
            case 'ar':
            case 'qa':
            case 'az':
               isRtl = true;
               break;
            default:
               isRtl = false;
         }

         activeLanguage = {
            name: lang,
            isRtl: isRtl
         };

         languageService.setLanguage(activeLanguage);
         $translate.use(lang);

         $ionicLoading.show();
      });

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).