I implemented a clickoutside directive in my project, at first I used Hidden but it will close the element on keydown.enter then I saw this post:How can I close a dropdown on click outside? and take the recommendation changed to ngIf and it works perfectly. Just wondering why the ngIf will work?
Asked
Active
Viewed 17 times
0
-
`ngif` means that it won't render that element if the condition is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) – Samathingamajig Jun 11 '21 at 04:28