I added this but when inspecting element using Chrome DevTools, the click function doesn\'t show!
Here\'s my code:
Watch your *matRowDef
, you created a row variable, yet in your click event, you're giving an element one.
Otherwise, you won't see it be inspecting it : Angular creates event listeners in JS to handle events. You can either create it in HTML or in Javascript, they choose to do it in Javascript. Just test your function with a console log, it should work.