I used the below code to display image on hover. Now I want to make sure it works on mobile screen also. Mobile does not have mouse over , how can we implement that? How to handle click and mouseover both events depending on screen size? https://stackblitz.com/edit/angular-s1k7m2?file=src%2Fapp%2Ftooltip%2Ftooltip.component.css
Asked
Active
Viewed 348 times
0
-
1Please include your code in your question and format it as code. Please also invest some effort up front. This issue has been around as long as mobile browsers so what have you learned from your searches and where did it fall short in the implementation? – Blind Spots Nov 17 '22 at 21:13
1 Answers
0
How about adding both hostListeners, click and mouseover and then using the navigator isMobile
flag to execute either of the two?
navigator.userAgentData.mobile
Reference: detect mobile browser

Naren Murali
- 19,250
- 3
- 27
- 54