Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

243
Views
Angular 12: ¿Cómo implementar la herencia de la superclase y las clases secundarias (componentes), cuando el padre usa la propiedad privada como argumentos del constructor?

Tengo una superclase (componente) y algunas clases secundarias (componentes) y necesito verificar PLATFORM_ID en cada una de ellas (algo así como a continuación):

 //Parent import { Component, Inject, OnInit, PLATFORM_ID } from '@angular/core'; import { isPlatformBrowser } from '@angular/common'; export class SliderComponent implements OnInit { ... constructor(@Inject(PLATFORM_ID) private platformId: Object) {} ... } //Child export class ProductsComponent extends SliderComponent implements OnInit { ... constructor(private pls: ProductsService) { super(); // <-- I don't want to pass smth. here because I'll need to import add. modules } ... }

¿Puedo implementar la herencia sin importar Inject, PLATFORM_ID, etc.?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!