joanllenas / ngx-date-fns

⏳ date-fns pipes for Angular
163 stars 14 forks source link

Angular 16 support #399

Closed mohamed-badaoui closed 1 year ago

mohamed-badaoui commented 1 year ago

Angular 16 support ?

Please answer the following questions:

Angular version? 16.x TypeScript version? 5.x

joanllenas commented 1 year ago

Hi @mohamed-badaoui could you elaborate on what's required? Is the library not working at all? is it implementing some new features?

mohamed-badaoui commented 1 year ago

Hi @joanllenas Sorry, I thought it was compatible only until angular 15.x. I were wrong, it works fine with angular 16.x
Thanks.

isaac-manubag commented 1 year ago

@joanllenas how can I import the pipes properly on Angular v16? sample code

<span>{{ note?.author?.full_name}} - {{ note.created_at | dfnsParseIso | dfnsFormat:'dd MMM yyyy'}}</span>
@Component({
  selector: 'customer-general-tab',
  standalone: true,
  templateUrl: './customer-general-tab.component.html',
  styleUrls: ['./customer-general-tab.component.scss'],
  imports: [
    CommonModule,
    ParseIsoPipeModule,
    FormatPipeModule,
  ],
})

Error: image

joanllenas commented 1 year ago

Hi @isaac-manubag Here's an example: https://stackblitz.com/edit/stackblitz-starters-kt3tcp?file=src%2Fmain.ts Hope it helps