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

Angular like formatters #4810

Closed
fincha opened this issue Aug 23, 2017 · 2 comments
Closed

Angular like formatters #4810

fincha opened this issue Aug 23, 2017 · 2 comments

Comments

@fincha
Copy link

fincha commented Aug 23, 2017

Description

I thinking of some problems I faces in my development, so I thought maybe some one else is interested in a feature like a angular one

ex:

{{ item | 'currency' }}

so you can format your output the way you wish, also supporting custom functions.

I plan to implement this for the version 3

@web-padawan
Copy link
Contributor

web-padawan commented Aug 23, 2017

This existed as of 0.5 in the form of polymer-filters and was deprecated due to performance reason. Of course you can do something like this now as a mixin, see also polymer-expressions for some inspiration.

BTW @justinfagnani, what is a status of polymer-expressions now when your focus is lit-html?

@TimvdLippe
Copy link
Contributor

We have had similar requests, for example see #4038 (comment) You can override _parseBindings to implement this functionality. In the future, solutions like lit-html can streamline this even more, by taking advantage of the direct JS context when evaluating templates.

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

3 participants