Skip to content
This repository has been archived by the owner on May 21, 2021. It is now read-only.

Commit

Permalink
fix($compileProvider.debugInfoEnabled): avoid use of angular.element.…
Browse files Browse the repository at this point in the history
…scope()

scope lookup doesn't work when using debugInfoEnabled(false) so attach scope to the lookup table
  • Loading branch information
Philipp Burgmer committed Apr 3, 2015
2 parents 14eb229 + a306b6b commit 17eb84e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/js/w11k-flash.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 () {
Expand Down

0 comments on commit 17eb84e

Please sign in to comment.