how to extend service with dependencies in angular 2

The parameters of the super class need to be repeated and passed to the super call:

@Injectable()
export class ChildService extends ParentService{
  constructor (http:Http, customService:CustomService){
    super(http, customService);
  }
}

There are some “hacks” to work around like Inheritance and dependency injection

Leave a Comment