I'm new to Angular2 and I'm reading the differences between elements, components, directives, etc. and I don't understand why @Directive exist.
I already read the documentation (it's not necessary to link it, thanks, I already checked it) and I've seen that @Component is a particular case of a directive. Also, there are different kinds of directives (Structural, Attributes and the already mentioned Components). However, at the end of the day, I look at some examples of @Directive and I find they can be substituted by an (event) in the corresponding @Component.
Example: the main example of a @Directive in this page @Directive v/s @Component in Angular could be substituted with something similar to
<contact-card [name]="'foo'" [city]="'bar'" (onClick)="someAction()"></contact-card>
Perchance I didn't understand it properly and it is not possible to substitute it, but it case it is, is there any good reason or useful examples where using @Directive is actually necessary or simpler than tweaking a @Component?
Thanks in advance!
Highlight me!
` but, as I said, I might be wrong. I'll try to do it as an exercise, actually. – xavier Mar 27 '19 at 11:33