It's like click, but when you don't click on your element.
``` npm install angular-off-click --save ``` ```html <script src="node_modules/angular-off-click/dist/angular-off-click.js"></script> ``` Installing
bower install angular-off-click --save
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 (`off-click-filter`). ```html Show Navigation ``` Usage/Example
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-if attribute is an expression that will determine if the
off-click should trigger or not.
off-click-filter directive allows you to pass a comma separated list of targets whose
off-click will not be triggered when the element
If you pass
off-click-filter="'*'" that element will be a filter for every off-click on the page. The value is an angular expression and as such, you can also pass dynamic values like so:
off-click-filter="'#' + myIdInScope" and