When I click on "Add New Item" button I want a popup form to be displayed.
Then if I click outside this form I want it to hide itself.
To show/hide form I use `ng-show` directive. To watch for outside clicks I use third-party Angular directive [angular-clickout](https://github.com/neoziro/angular-clickout) But there is a problem - this directive start working on page load and when I click on "Add New Item" button it immediately invokes my closing function which in turn sets boolean attribute to false value and `ng-show` hides a form...

HTML:

```
<button ng-click="vm.displayDialogAddNewItem()>Add New Item</button>
<div class="new-item-dialog" 
     ng-show="vm.dialogAddNewItemIsVisible"     
     click-out="vm.hideDialogAddNewItem()">
    ... omitted code ...
</div>

```

Controller's code:

```
vm.displayDialogAddNewItem = function() {
    vm.dialogAddNewItemIsVisible = true;
};

vm.hideDialogAddNewItem = function() {
    vm.dialogAddNewItemIsVisible = false;
};

```