We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ed043c commit a9ec123Copy full SHA for a9ec123
src/directive/translate-cloak.js
@@ -21,7 +21,7 @@ angular.module('pascalprecht.translate')
21
*/
22
.directive('translateCloak', translateCloakDirective);
23
24
-function translateCloakDirective($translate) {
+function translateCloakDirective($translate, $rootScope) {
25
26
'use strict';
27
@@ -43,6 +43,9 @@ function translateCloakDirective($translate) {
43
iAttr.$observe('translateCloak', function (translationId) {
44
$translate(translationId).then(iRemoveCloak, iApplyCloak);
45
});
46
+ $rootScope.$on('$translateChangeSuccess', function () {
47
+ $translate(iAttr.translateCloak).then(iRemoveCloak, iApplyCloak);
48
+ });
49
} else {
50
$translate.onReady(iRemoveCloak);
51
}
0 commit comments