SDS Components :: Angular Click Outside Directive
Directive emits event when clicking outside of the element where directive applies.
$event emitted is
Angular >= v.8.2.10
npm install @stratiods/click-outside or
yarn add @stratiods/click-outside.
You need to import
ClickOutsideModule into your module
Then use this way:
apply: boolean = true;
You can dcide through this boolean input if directive works or not.
exceptions: Array<string> = ;
Array composed by external DOM id's that by clicking on them, the clickOutside event is not emitted.
clickOutside: EventEmitter<undefined> = new EventEmitter;
Emits event when clicking outside of the element where directive applies.