@Injectable()
export class APIService {
constructor(private http: Http) {
}
}
@Injectable()
export class CourseAPIService extends APIService{
constructor(private http2: Http){
super(http2);
}
}
私は、コンストラクタパラメータとしてHttpを持つAPIServiceとしてベースクラスを持っていますが、残念ながら、子クラスCourseAPIServiceに再度渡す必要があります。 もしあれば、私を助けてください...?TypeScript、Angular2の派生クラスで基本クラスのコンストラクタパラメータを繰り返さないようにするにはどうすればよいですか?