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

301
Views
¿Cómo proporcionar NbDateService desde nebular? NullInjectorError con NbDateService

Estoy creando un calendario personalizado y extend desde NbCalendarDayCellComponent<Date> . Necesito inyectar otros servicios a mi customCellComponent, pero si lo hago, necesito inyectar NbDateService y recibo el siguiente error:

ERROR NullInjectorError: R3InjectorError(AppModule)[NbDateService -> NbDateService -> NbDateService]: NullInjectorError: No hay proveedor para NbDateService

Intenté agregar diferentes módulos y no funcionó.

Módulo del kit de calendario

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

En su app.module.ts agregue:

 // ... import { NbDatepickerModule } from '@nebular/theme'; // ... @NgModule({ //... imports: [ NbDatepickerModule, ], //... })

Luego, en su CustomCellDayComponent funcionará esto:

 export class CustomCellDayComponent extends NbCalendarDayCellComponent<Date> implements OnInit, OnDestroy { constructor(public nbDateService: NbDateService<Date>,){ super(nbDateService); } }
over 4 years ago · Santiago Trujillo Report

0

Puede intentar agregar un proveedor NbDateService en App.module.ts

 @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, AppRoutingModule, NgxGenericTableModule, BrowserAnimationsModule ], providers: [ NbDateService // Add provider in your app.module ], bootstrap: [AppComponent] })
over 4 years ago · Santiago Trujillo Report
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!