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

Commit

Permalink
fix(cloak): fix missing decloak introduced by optimize #1694
Browse files Browse the repository at this point in the history
Fixes #1705
Relates #1694
  • Loading branch information
knalli committed Mar 4, 2017
1 parent 8ed043c commit a9ec123
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/directive/translate-cloak.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ angular.module('pascalprecht.translate')
*/
.directive('translateCloak', translateCloakDirective);

function translateCloakDirective($translate) {
function translateCloakDirective($translate, $rootScope) {

'use strict';

Expand All @@ -43,6 +43,9 @@ function translateCloakDirective($translate) {
iAttr.$observe('translateCloak', function (translationId) {
$translate(translationId).then(iRemoveCloak, iApplyCloak);
});
$rootScope.$on('$translateChangeSuccess', function () {
$translate(iAttr.translateCloak).then(iRemoveCloak, iApplyCloak);
});
} else {
$translate.onReady(iRemoveCloak);
}
Expand Down

0 comments on commit a9ec123

Please sign in to comment.