I upgraded my Angular from 4 to 6, and consequently had a problem with my click-off policy, it stopped working on all components.
my directive:
You're referencing "this" in your template, which is not necessary. I made a working example of that directive:
https://stackblitz.com/edit/angular-piqewb
And theres no reason to have the directive on the div twice.
{{ navTitle }}