I'm currently facing an issue with Typescript where I am attempting to apply a style on a HTMLElement. Below is the code snippet:
styleChoice(element:HTMLElement){
console.log(element);
element.style.background="rgba(228, 48, 48, 0.2)";
element.style.borderRadius="40px";
}
test(){
console.log(document.getElementById('test'));
this.styleChoice(document.getElementById('test'));
}
Unfortunately, I am unable to figure out why it's not working as expected.