how to extend service with dependencies in angular 2

前端 未结 3 1399
野的像风
野的像风 2020-12-14 06:48

I have a parent service which has some dependencies like

@Injectable()
export class ParentService{
  constructor(private http:Http, private customService:Cus         


        
3条回答
  •  时光取名叫无心
    2020-12-14 07:13

    If you make the DI services in the abstract class protected and omit the constructor in the subclass, then the services are available in the subclass.

提交回复
热议问题