angular-moment icon indicating copy to clipboard operation
angular-moment copied to clipboard

amMoment.changeLocale and ui-router

Open johannesjo opened this issue 9 years ago • 4 comments

When using ui-router the locale is only loaded correctly on the first page. After triggering a route change it defaults back to the default browser language.

I worked around this by setting the local on $stateChangeStart

$rootScope.$on('$stateChangeStart', function (event, next) {
      amMoment.changeLocale('de');
});

johannesjo avatar Apr 15 '15 14:04 johannesjo

I'm having the same issue, but this work around does not resolve it entirely for me ... any ideas on what causes it ?

corentin-gautier avatar May 22 '15 09:05 corentin-gautier

I still have no idea what could be causing this, have you found out why this happens?

Otherwise, I'd appreciate a short plunkr example demonstrating this issue so I could investigate it. Thanks!

urish avatar Jul 31 '15 16:07 urish

For me problem seems related to another lib, angular-timer. Once removed it, problem disappeared.

Now I need to understand what's wrong with angular-timer, 'cause I need it!

rooswelt avatar Apr 05 '16 16:04 rooswelt

Specifying "language" attribute for each <timer> in my code seems resolve problem,

Hope it helps

rooswelt avatar Apr 05 '16 17:04 rooswelt