1

I tried to extend a class in a class that will be a dialog in Angular. My class is something like this:

export class DocDialogComponent extends DocComponent{}

I intend to do it in order to use a method inside of DocComponent in DocDialogComponent, but when I run it, it says:

errors-handler.ts:26 Error: Uncaught (in promise): ReferenceError: Cannot access 'DocComponent' before initialization ReferenceError: Cannot access 'DocComponent' before initialization

How can I solve it?

ArthurS
  • 137
  • 1
  • 2
  • 5
  • 1
    Does this answer your question? [Angular: 7.2.1 ES6 class ReferenceError : Cannot access 'X' before initialization](https://stackoverflow.com/questions/56870661/angular-7-2-1-es6-class-referenceerror-cannot-access-x-before-initializatio) – mbojko Jan 14 '20 at 12:50
  • check this - https://stackoverflow.com/questions/36475626/how-to-extend-inherit-components – Piyush Jain Jan 14 '20 at 12:51

0 Answers0