1

I'm using Date pipe in app.module.ts page

component.html:

<a>{{req_details.deadLine | date:'mediumDate'}}</a>

app.module.ts:-

import {DatePipe} from '@angular/common';

@NgModule({
  declarations: [
    AppComponent,
    LoginComponent
  ],
  imports: [
    DatePipe
  ],

please help on this where I did mistake.

User0777
  • 21
  • 3
  • 3
    Have you checked the [documentation](https://angular.io/api/common/DatePipe)? You need to import `CommonModule`. – JSON Derulo Jul 14 '23 at 11:38
  • Does this answer your question? [Angular datepipe cannot be found](https://stackoverflow.com/questions/69100715/angular-datepipe-cannot-be-found) – Yong Shun Jul 14 '23 at 13:26
  • Hello, Did you solve the problem ?I am getting the same error in my angular 14 project.I added CommonModule but it didn't. – zdnmn Jul 21 '23 at 08:05

1 Answers1

0

Try add Common Module to your imports

imports: [
    CommonModule,
]