I recently upgraded my Angular app from v9 to v10.
I noticed that undecorated classes are not supported anymore. See here
So during ng upgrade
my abstract components without decorates have been changed to have a @Directive()
decoratror.
For example
export abstract class AbstractFormControl implements ControlValueAccessor { ... }
was changed into
@Directive()
export abstract class AbstractFormControl implements ControlValueAccessor { ... }
Why does Angular use @Directive
. Wouldn't @Component
be a better way because the class is rather a Component than a Directive? What was the intention?