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

1.6K
Views
Ningún proveedor para DatePipe

Traté de usar DatePipe en mi servicio de esta manera:

 import { Injectable } from '@angular/core'; import { DatePipe } from '@angular/common'; import { TranslateService } from '@ngx-translate/core'; @Injectable({ providedIn: 'root', }) export class BaseService { public items = []; constructor( protected datePipe: DatePipe, protected translateService: TranslateService ) { } }

Pero me sale este error: NullInjectorError: No provider for DatePipe!" . ¿Cuál es la causa?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Simplemente agregue DatePipe en la sección de proveedores de NgModule en su archivo app.module.ts .

 import { DatePipe } from '@angular/common'; ... @NgModule({ declarations: [...], imports: [...], providers: [ DatePipe, ... ], 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!