Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72388

How to capture bootstrap drop down close event in angular 8, on click of outside of drop down

$
0
0

I am using Angular 8 with the Azia theme (bootstrap 4 theme). I want to capture the close event of the dropdown when I click outside of the dropdown. In the below code snippet that show class needs to be added conditionally to hide/show dropdown. below code not working at one condition that is the outside click of dropdown due to default behavior of a theme. double click is needed to open dropdown. so i want to capture event when css changes of dropdown.

Here is my code.

<div (click)="isShowDropDown != isShowDropDown" #notification id="noti"
  [ngClass]="isShowDropDown ? 'dropdown az-header-notification cursor-pointer show' : 'dropdown az- 
  header-notification cursor-pointer'">

  // code here to show dropdown content.

  </div>

Viewing all articles
Browse latest Browse all 72388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>