When i execute a JS code in typescript, i get the following error:
ORIGINAL EXCEPTION: TypeError: Cannot read property 'setAttribute' of null
But It works perfectly in JS without any errors.
<HTML>
<path id="border" transform="translate(125, 125)" style="stroke:white; marker-end:url(#InverseSemicircleEnd);"/>
</HTML>
TS:
document.getElementById("border").setAttribute("style",dec);
But not sure, why it results in error on TS. I also tried to change the name of the property for this ID, but no luck. Can some one help me in explaining on what i'm doing wrong here.
Thanks For your support Regards Suresh