Use Angular directives to extend components that you don't own #229
Replies: 9 comments 8 replies
-
Hi, how do you use these new ones directives on your HTML? Can you explain it? |
Beta Was this translation helpful? Give feedback.
-
Good question @carlos-gomez-espinosa |
Beta Was this translation helpful? Give feedback.
-
Hello, great content. I also notice that directive are often underrated. I am on my third commercial project and across all of them directive were very rarely. |
Beta Was this translation helpful? Give feedback.
-
That's great to hear, thanks for the feedback @rafal21-ops ! |
Beta Was this translation helpful? Give feedback.
-
Is it deliberate that the name of the directive is the same as the prime-ng component selector? It works but linting shows that it should be used as a selector? |
Beta Was this translation helpful? Give feedback.
-
Very Helpful! |
Beta Was this translation helpful? Give feedback.
-
For me the worst thing is that I can't modify HTML, add new elements myself, modify element. this is the biggest problem, if for example you have a wrapper (jumbotron) and you want to put the calendar and a few more buttons in it, this part seems complicated to me, do you have any ideas? |
Beta Was this translation helpful? Give feedback.
-
Very helpfull |
Beta Was this translation helpful? Give feedback.
-
so I want to override a spinner when startRequest, I did it with the selector: 'spinner', it overwrote it the first time, but not after that! spinner component has ngIf inside. How should I proceed in this case, I want to overwrite all the time |
Beta Was this translation helpful? Give feedback.
-
Use Angular directives to extend components that you don't own - Tim Deschryver
Angular directives allow us to extend components without changing their internal code. This is useful to bring a consistent UX to 3rd party components. The directive can be configured to always be applicable, or can be used in an opt-in or opt-out basis.
https://timdeschryver.dev/blog/use-angular-directives-to-extend-components-that-you-dont-own
Beta Was this translation helpful? Give feedback.
All reactions