what about this first approach?
HomeComponent extends BaseLoggerComponent implements OnInit, OnDestroy {
constructor(
private httpRest: HttpRestService,
private errorHandler: ErrorHandlerService,
logger: LoggerService) {
super(logger);
} [...]
OR
HomeComponent implements OnInit, OnDestroy {
constructor(
private httpRest: HttpRestService,
private errorHandler: ErrorHandlerService,
private logger: LoggerService) {}
[...]
BASE CLASS:
export class BaseComponent {
constructor(protected logger: LoggerService) {
super();
}
}
Are there any important differences between the two approaches?
Comments
Post a Comment