From official documents we know that
A component decoder allows you to mark a class as an Angular component and provide additional metadata that determines how the component should be processed, created, and used at runtime.
But I would like to go deeper and understand what the Component Decoder really does, besides providing additional metadata.
I plunged into the source code and found that all decorators are created using makeDecorator . And here I got lost. Where is the difference, for example, for Component and ngModule decorators? Do they do the same? Do not think so.
Like the answer, it would be nice to have a step-by-step description of what I should do to recreate the Decorator components without the makeDecorator function.
UPD : and, of course, I know how they work
source share