Why Angular2 (click) event is not firing on a ?

Your code snippet looks all good!

The issue is in your CSS styles. Your <div> probably either inherits a different position value or simply – goes behind another element which element blocks your <div> (does not allow it to be clicked).

By changing the position to relative it works, most probably because this position enables z-index and moves your <div> on top to the other element that’s blocking it.

This should be enough for you to figure it out. But if you want more detailed answer – please share your CSS too.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)