I have 2 classes, Class A and ClassB. Class B extends Class A so that I can access the instances and services of Class A. Class B has some functions which I will use in Class A. When I implemented this, circular Dependency error showed up and now I get a browser error saying:
"tslib.es6.js:25 Uncaught TypeError: Object prototype may only be an Object or null: undefined".
import { BuyerCardComponent} from './buyer-card.component'
export class BuyerCardExtended extends BuyerCardComponent{
func a(){
do_something;
}
}
import { BuyerCardExtended } from './buyer-card-extended'
class BuyerCardComponent {
constructor(private buyerCardExtended: BuyerCardExtended){}
func b(){
this.buyerCardExtended.a()
}
}
WARNING in Circular dependency detected: src/app/components/buyer/products/buyer-card/buyer-card.component.ts -> src/app/components/buyer/products/buyer-card/buyer-card-extended.ts -> src/app/components/buyer/products/buyer-card/buyer-card.component.ts
Browser :
"tslib.es6.js:25 Uncaught TypeError: Object prototype may only be an Object or null: undefined"