angular-moment
angular-moment copied to clipboard
amMoment.changeLocale and ui-router
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');
});
I'm having the same issue, but this work around does not resolve it entirely for me ... any ideas on what causes it ?
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!
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!
Specifying "language" attribute for each <timer>
in my code seems resolve problem,
Hope it helps