Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor Feature Request: Support for Pipes formatters #12389

Closed
punjabier opened this issue Jul 20, 2019 · 2 comments
Closed

Blazor Feature Request: Support for Pipes formatters #12389

punjabier opened this issue Jul 20, 2019 · 2 comments
Labels
area-blazor Includes: Blazor, Razor Components question

Comments

@punjabier
Copy link

punjabier commented Jul 20, 2019

It will be good if there is Pipes feature as in Angular

<p>The hero's birthday is {{ birthday | date }}</p>

This feature will also be beneficial in Globalization/ Localisation
#9386 Globalisation and Converters
@bind-globalization is specific to input element. It will not go too far with other elements like (eg.)div

<input type="text" @bind="coolnessLevel" @bind:culture="CultureInfo.InvariantCulture">
  Rate the coolness of Blazor (in a non-locale-specific way)
</input>

Other Pros of Pipes syntax

  • Chainable
  • Will work anywhere
    @value | date: 'MMM dd, yyyy' | uppercase
    @value | culture:'en-us'
    @value | converter:'default'
    List goes on ...
@RemiBou
Copy link
Contributor

RemiBou commented Jul 22, 2019

There is already method and extension method in C#. What would be the added value of another syntax ?

@value.ToString("MMM dd, yyyy", CultureInfo.InvariantCulture).ToUpper()

@mkArtakMSFT mkArtakMSFT added the area-blazor Includes: Blazor, Razor Components label Jul 22, 2019
@mkArtakMSFT
Copy link
Member

Thanks for contacting us. We believe that the question you've raised have been answered. If you still feel a need to continue the discussion, feel free to reopen it and add your comments.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components question
Projects
None yet
Development

No branches or pull requests

3 participants