Why doesn't Angular matTooltip work when you add it dynamically?
问题 I have an SVG element and I want to add a matTooltip at some point in Angular. I observed that if I try to add matTooltip like this: generate() { var svgEle = document.getElementById("testSVG"); var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); rect.setAttribute('id', "rect"); rect.setAttribute('x', "73"); rect.setAttribute('y', "95"); rect.setAttribute('class', "st01"); rect.setAttribute('width', "407"); rect.setAttribute('height', "328"); rect.setAttribute(