Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Calling changeLocale doesn't work with amFromUnix filter #297

Open
magicznyleszek opened this issue Aug 28, 2017 · 0 comments
Open

Calling changeLocale doesn't work with amFromUnix filter #297

magicznyleszek opened this issue Aug 28, 2017 · 0 comments

Comments

@magicznyleszek
Copy link

magicznyleszek commented Aug 28, 2017

I'm using latest 1.0.1 version.

This is my karma test scenario:

amMoment.changeLocale('en-US');
el = angular.element('<span am-time-ago="\'1095379200\' | amFromUnix"></span>');
el = $compile(el)($rootScope);
$rootScope.$digest();
expect(el.text()).toBe('13 years ago');

amMoment.changeLocale('pl-PL');
expect(el.text()).toBe('13 lat temu');

The first expect passes, but second one doesn't: Expected '13 years ago' to be '13 lat temu'.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant