How to use svg beginElement() in angular 6?

881 Views Asked by At

I've been trying to trigger restart on my svg animation by button click. I found the method beginElement() on the web and it's working for normal javascript/jquery but when i try to use the exact same method on angular 6, i got error like this:

"Property 'beginElement' does not exist on type 'HTMLElement'", any idea how to fix this? or any suggestion on alternative method for me to restart svg animation by button click on angular 6 app?

My code: document.getElementByID("svg-id").beginElement();

0

There are 0 best solutions below