Stack Exchange
Stack Overflow
Questions
Tags
Users
About
Stack Overflow
Public
Questions
Tags
Users
About
Can I apply directive to nativeElement programmatically(dynamically)?
Asked
Mar 30 '21 at 04:27
Active
Mar 30 '21 at 04:27
Viewed
34 times
0
For example:
<button>Click<button>
into
<button mat-raised-button color="accent">Click<button>
angular
asked Mar 30 '21 at 04:27
Syimyk Amatov
71
1
4
Does this answer your question? [How to dynamically add a directive?](https://stackoverflow.com/questions/41298168/how-to-dynamically-add-a-directive)
–
Osama A.Rehman
Mar 30 '21 at 04:56
In this example directive applies to component but I need to DOMElement
–
Syimyk Amatov
Mar 30 '21 at 07:54
0 Answers
0