Skip to content

Use Date Pipe for Angular Client #39274

@giuliohome

Description

@giuliohome

You should be using a date pipe in fetch-data.component.html at line 18, the fix is shown below

    <tr *ngFor="let forecast of forecasts">
      <td>{{ forecast.date | date }}</td>

or complete with time part

    <tr *ngFor="let forecast of forecasts">
      <td>{{ forecast.date | date :'medium' }}</td>

It looks quite better - either just a date

image

or date and time -

image

than the original vanilla version in ISO format

image


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-ui-renderingIncludes: MVC Views/Pages, Razor Views/PagesenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-spafeature-templates

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions