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

Raising number of watchers when using 'translate-n' directive

Open nasonovmaksim opened this issue 9 years ago • 1 comments

Hello! I'm using gettext to translate plural expression like this:

https://plnkr.co/edit/0TleimZl9ehza8A6XTE0

changeLanguage switch current language. If I check watchers count, it raises every time when I click changeLanguage button or change model in input. Seems like $$watchersCount in directive scope raises every time when directive updates.

Am I doing something wrong or I found a bug?

nasonovmaksim avatar Mar 03 '16 07:03 nasonovmaksim

Watchers count raise only if we have angular expression inside singularstr or pluralstr, this example works fine:

https://plnkr.co/edit/FJD7o9SMFUJYqzTu0fKw

But this is strange, because example in developer guide will increase count of watchers too:

One boat

nasonovmaksim avatar Mar 03 '16 07:03 nasonovmaksim