Hi there, I have migrated my project from Angular 11 to Angular 13 using v7.0.0 of the DialogModule.
If I define an abstract class like so:
@Directive()
export abstract class MyAbstractDialog extends DialogContentBase {
}
Then I define a concrete implementation of this class like so
@Component(...)
export class MyConcreteDialog extends MyAbstractDialog {
}
This ran happily using Angular 11. But with Angular 13, at runtime I see the following exception:
Directives cannot inherit Components. DirectiveMyAbstractDialog is attempting to extend component DialogContentBase
ERROR Error: Uncaught (in promise): Error: NG0903
Error: NG0903
at ɵɵInheritDefinitionFeature (core.mjs:12388:23)
at core.mjs:926:48
at Array.forEach (<anonymous>)
at Object.toString (core.mjs:926:32)
at noSideEffects (core.mjs:592:29)
at Module.ɵɵdefineComponent (core.mjs:882:12)
Do you know why this might be? Does DialogContentBase need a Directive() decorator to get this working? The work around I have found is to duplicate the common code in the base class into each of it's descendants and remove the abstract class. But I don't really want to be duplicating code!
Thanks