Menubar doesn't work correctly (angular)

Hi All,

I just start learning Angular and create a menubar of bootstrap. But whenever I click on the menubar which has dropdown, it doesn’t close after I hover out to next elements, it only close when I clicked somewhere else.
But I want to close it on hover out,
I find a code
`.dropdown > .dropdown-toggle:active {
/Without this, clicking will make it sticky/

 pointer-events: none;

} `

But using this code the click even of main Div doesn’t work.
I give a deep search but got nothing so I post it here to get help on this.