Skip to content

Commit a9ec123

Browse files
committed
fix(cloak): fix missing decloak introduced by optimize angular-translate#1694
Fixes angular-translate#1705 Relates angular-translate#1694
1 parent 8ed043c commit a9ec123

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/directive/translate-cloak.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ angular.module('pascalprecht.translate')
2121
*/
2222
.directive('translateCloak', translateCloakDirective);
2323

24-
function translateCloakDirective($translate) {
24+
function translateCloakDirective($translate, $rootScope) {
2525

2626
'use strict';
2727

@@ -43,6 +43,9 @@ function translateCloakDirective($translate) {
4343
iAttr.$observe('translateCloak', function (translationId) {
4444
$translate(translationId).then(iRemoveCloak, iApplyCloak);
4545
});
46+
$rootScope.$on('$translateChangeSuccess', function () {
47+
$translate(iAttr.translateCloak).then(iRemoveCloak, iApplyCloak);
48+
});
4649
} else {
4750
$translate.onReady(iRemoveCloak);
4851
}

0 commit comments

Comments
 (0)