Its like click, but when you don't click on your element.
Ability to choose elements outside of your element that will not trigger the
Ability to pass an expression to determine of the
off-click event should trigger.
Here we have a slide out navigation div that will appear when the user clicks a button. We want the div to go away when they click off of it (
off-click). We also want to make sure the button that triggers the div to open, also does initial close it (
<button id="nav-toggle">Show Navigation</button>
<div id="slide-out-nav" ng-show='showNav' off-click='showNav = false' off-click-filter='#nav-toggle' off-click-if='showNav'>
off-click attribute is the expression or function that will execute each time the user doesn't click on your element (or filter)
off-click-filter attribute is a comma separated list of selectors that will not trigger
off-click when they are clicked.
off-click-if attribute is an expression that will determine if the
off-click should trigger or not.