Skip to content

Instantly share code, notes, and snippets.

@dcherman
Created April 21, 2015 19:55
Show Gist options
  • Select an option

  • Save dcherman/5dbd3b63fe4cfe6f55ad to your computer and use it in GitHub Desktop.

Select an option

Save dcherman/5dbd3b63fe4cfe6f55ad to your computer and use it in GitHub Desktop.
function decorateExpressionBindings( binding, scope, attrs ) {
var delegate = $parse( attrs[ binding ] ).$$watchDelegate,
actualBinding = scope[ binding ];
if ( parsed.$$watchDelegate ) {
actualBinding.$$watchDelegate = function( scope, listener, objectEquality, parsedExpression ) {
return delegate( scope.$parent, listener, objectEquality, parsedExpression );
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment