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

add ability to have formatting pipe, {{=it.now|formatDate}} #301

Closed
venelin-mihaylov opened this issue Sep 11, 2020 · 2 comments
Closed

Comments

@venelin-mihaylov
Copy link

I want/need to have a formatter pipe in the template, like this:

{{=it.now|formatDate}}

Which should pass the it.now value to a formatDate() function

Can you please point me, how I might be able to hack that into dot.js ?
Thank you

@epoberezkin
Copy link
Collaborator

Check out v2 beta - it’s has syntax {{fmt! it.now}} and some other good stuff - check the release notes

@epoberezkin
Copy link
Collaborator

So effectively old syntax for escaping HTML was extended to format data in arbitrary way (and HTML escaping is not enabled by default - it has to be added).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants