Angular: 7.2.1 ES6 class ReferenceError : Cannot access 'X' before initialization

后端 未结 5 2119
别那么骄傲
别那么骄傲 2020-12-10 10:44

I\'m having the following TypeScript class

export class Vehicule extends TrackableEntity {
  vehiculeId: number;
  constructor() {
    super();
    return s         


        
5条回答
  •  青春惊慌失措
    2020-12-10 11:18

    I was getting this error due to a circular dependency, like

    • A injected with B
    • B injected with C
    • C injected with A

    Removing the circular dependecy fixed this error.

提交回复
热议问题