Answers for "nativeelement angular add class"

1

nativeelement angular add class

constructor(public elementRef: ElementRef, private renderer: Renderer)
{
        this.renderer.setElementClass(this.elementRef, 'class');
   // or 

            this.elementRef.nativeElement.classList.add('class');

}
Posted by: Guest on May-11-2021

Code answers related to "nativeelement angular add class"

Code answers related to "Javascript"

Browse Popular Code Answers by Language