Search code examples
angularpopupangular-dynamic-components

How to keep dynamic popup displaying on hover


I have created a dynamic popup in angular that appears when I hover over span(or button) but disappear when I leave that span. I cannot figure out how to keep that popup displaying when I'm hovering over it. Gotta be some simple solution I guess( Would appreciate any help.

Here is the link for app https://stackblitz.com/edit/angular-khoagq


Solution

  • In case someone is interested. I've managed to solve this. Edited it at the same link https://stackblitz.com/edit/angular-khoagq / What I've done: - moved popup state managing out of directive to component; - added host directive which will contain dynamic component. I'm still not satisfied with this solution. Would like to have something more reusable instead of copying managing methods to each component where I want to have popup.