🔍
🏠
Stack Overflow
🎲
Stack Exchange
Stack Overflow
Questions
Tags
Users
About
Stack Overflow
Public
Questions
Tags
Users
About
Is it possible to add structural directives like *ngIf and *ngFor to elements that are added to DOM using renderer 2?
Asked
Feb 18 '20 at 09:55
Active
Feb 18 '20 at 09:55
Viewed
175 times
0
this.renderer.setAttribute(this.element.nativeElement, '*ngIf', 'test');
Can we use like this?
angular
angular-renderer2
asked Feb 18 '20 at 09:55
Shruthi
1
did you **try** adding?
–
bananas
Feb 18 '20 at 09:57
yes, but it does not seem to work.
–
Shruthi
Feb 18 '20 at 09:57
Sorry, But I think that has no sense, using this.renderer 2 you can add somay HTML elements you want. Anyway, **sure** there're a better aproach than use renderer
–
Eliseo
Feb 18 '20 at 10:03
0 Answers
0