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

Directive & binding will not return promise object. Ok in RC1, broken in RC2 #4214

Closed
georgiosd opened this issue Oct 1, 2013 · 3 comments
Closed

Comments

@georgiosd
Copy link

When binding a scope '&' binding to a directive, the behavior has changed from RC1 to RC2/latest snapshot and seems broken.

Consider this action:

$scope.action = function() {
      var deferred = $q.defer();
      console.log('this is called');
      return deferred.promise;
    };

RC1 will print promise object returned (please have console open): http://plnkr.co/edit/2U6OX0
RC2 will print undefined: http://plnkr.co/edit/iONi7F

@georgiosd
Copy link
Author

Any workarounds that don't require changing a large code base that relies on this directive? :S

@georgiosd
Copy link
Author

By the way, the same behavior is observed with scope.$eval(attrs.action) alternative

@georgiosd
Copy link
Author

Discussed here already: #4158

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant