Answers for "addclass nativeelement angular"

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 "Javascript"

Browse Popular Code Answers by Language