I'm having a problem with an AngularJS 1.6 implementation.
I need to trigger an event by clicking outside a div element for example.
Note: ng-blur only works with form fields.
<li class="dropdown-toggle" ng-controller="SearchCtrl as ctrl">
<md-input-container class="search-main">
<label>Pesquisa</label>
<input ng-keyup="ctrl.loadSearchResults(search)" ng-model="search.term">
</md-input-container>
<div class="search-results" ng-if="ctrl.openModalSearch" ng-include="'views/search.html'"></div>
</li>
I want to fire the event when I click outside the "li".