Skip to content

Instantly share code, notes, and snippets.

@ryardley
Last active August 29, 2015 14:13
Show Gist options
  • Save ryardley/c0d64262eaf04ae1a4ab to your computer and use it in GitHub Desktop.
Save ryardley/c0d64262eaf04ae1a4ab to your computer and use it in GitHub Desktop.
link: function(scope, element, attrs){
var button = element.find('.MyOverlay-button');
var backgr = element.find('.MyOverlay-background');
// ...
button.on('click', function(){
// ...
});
scope.$watch('isOverlayShowing', function(isOverlayShowing){
if(isOverlayShowing){
backgr.css('display','block');
}
// ...
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment