diff --git a/src/js/w11k-flash.js b/src/js/w11k-flash.js index dc2f8c7..9dd370a 100644 --- a/src/js/w11k-flash.js +++ b/src/js/w11k-flash.js @@ -47,7 +47,7 @@ angular.module('w11k.flash').run(['$window', 'w11kFlashRegistry', function ($win $window.w11kFlashCall = function (flashId, expression, locals) { var flash = w11kFlashRegistry.getFlash(flashId); if (angular.isDefined(flash)) { - var scope = flash.element.scope(); + var scope = flash.scope; // we have to evaluate the expression outside of an apply-function, // otherwise we are unable to return the result to flash @@ -135,7 +135,8 @@ angular.module('w11k.flash').directive('w11kFlash', ['swfobject', '$window', '$q w11kFlashRegistry.registerFlash(flashId, { deferred: deferred, - element: element + element: element, + scope: scope }); scope.$on('$destroy', function () {