I'm using FullCalendar (angular version) and I wanted to add a glyphicon on the resources list that when hovered, shows angular's MatTooltip. The issue now is that using element.setAttribute('matTooltip')
is not cutting it. It's getting converted to mattooltip
which won't work.
So I was thinking if there is a possible way of instantiating matTooltip on new HTMLDomElement
let departmentInfoSpan = document.createElement('span');
departmentInfoSpan.setAttribute('matTooltip', 'sample tooltip');
The code above results to an html element like this:
<span mattooltip="sample tooltip"><span>?</span></span>
I was expecting the span element to be showing the tooltip when hovered.