Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
fix(directive): enforce update on default text change only
Browse files Browse the repository at this point in the history
This adds the mising `updateTranslations()` on changing the default text.

If we have something like this:
```
<span translate="{{not_existing_translation_key}}" translate-default="{{something.isChanging}}"></span>
```

And if the value of `something.isChanging` changes over time, the value does not update accordingly
  • Loading branch information
bildja authored and knalli committed Dec 13, 2015
1 parent b6c2f4c commit ea94acd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/directive/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ function translateDirective($translate, $q, $interpolate, $compile, $parse, $roo

iAttr.$observe('translateDefault', function (value) {
scope.defaultText = value;
updateTranslations();
});

if (translateValuesExist) {
Expand Down

0 comments on commit ea94acd

Please sign in to comment.