From 98fe649a241b79c245fb32d838b84f0fac319f5a Mon Sep 17 00:00:00 2001 From: knalli Date: Sun, 3 Aug 2014 15:04:23 +0200 Subject: [PATCH] fix(directive): change event for listening to `$translateChangeEnd` Under some circumstances, the cloak was not be removed: * the translations are already stored (not via custom loader) * no customer loader defined anyway This changes the listening event to the change-end phase, which will be invoked always. Fixes #658 --- src/directive/translate-cloak.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/directive/translate-cloak.js b/src/directive/translate-cloak.js index 5b9742c8a..27e092475 100644 --- a/src/directive/translate-cloak.js +++ b/src/directive/translate-cloak.js @@ -19,7 +19,7 @@ angular.module('pascalprecht.translate') return { compile: function (tElement) { - $rootScope.$on('$translateLoadingSuccess', function () { + $rootScope.$on('$translateChangeEnd', function () { tElement.removeClass($translate.cloakClassName()); }); tElement.addClass($translate.cloakClassName());