Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi All,

I am developing a menu using angular material menu and I want the menu icon to be disappeared once I click outside of the menu/submenu.

I don't know which event will exactly work for this, but I tried few things using css and other events like (blur) or (focusout). But, its not triggering those events.

Then I saw the API tab in the documentation and found that:
"@Input() backdropClass: string"


But I cannot find any example as how to use these. I mean how to add a css class using this @Input and what if I want to do the same for submenu?

What I have tried:

I have added a css class in the ".css" file.
Then I tried with three events: blur, focusout and menuOpened

But none of them are triggering the events at all.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900