logo
Search
showing results for - "nativeelement angular add class"
Paula
16 Feb 2016
1constructor(public elementRef: ElementRef, private renderer: Renderer)
2{
3        this.renderer.setElementClass(this.elementRef, 'class');
4   // or 
5
6            this.elementRef.nativeElement.classList.add('class');
7
8}
source
similar questions
dynamic classname reactng class in angularappend a method to an already existing class in javascriptaddclass to elementref angularappend element to specific classng class equivalent in reactngclassangular get class list for elementangualr add class to componentadd class when element in viewport vanilla javascriptangular dynamic classangular bind to class or ngclassngclass in angularangular ngclass
queries leading to this page
angular add class to native lementadd class to nativeelement angularadd class to nativeelement angular 8angular add class to native elementnativeelement addclass angularnativeelement add class angularangular native element add classnative element angular add classnativeelement addclass in angularangular nativeelement add classhow to add class using nativeelement in angularnativeelement angular add classaddclass nativeelement angularnativeelement angular add class
privacy policyterms of useinstagram
Crafted with  ♥  for everyone

sign in to continue
your answer for
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
sign in to continue
ask question on maxinterview
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content
please be clear, to the point and respectful
sign in to continue