Any helper function to format the string based on the pattern #2015
Unanswered
amritajudi
asked this question in
Q&A
Replies: 1 comment
-
There are a few Builtin helpers exists. @amritajudi You may need to implement your cusom helper for this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
We are formatting the property value based on a pattern. The current approach is, we have registered a helper function that formats the string value based on a specific pattern. This function is responsible to format a given value to specific time /date /currency format.
For e.g.
<span style="display: block; min-height: 0.3740em;">{{ format value '$%applicant.fundsLimit$,.2n' this }}</span>
In this case we have created a helper method
format
which formats it as a number with 2 decimal places.Is there a way to extend the compiler to process custom syntax, such as our use of %applicant.fundsLimit$,.2n ? We don't want format value ... this to be in our templates.
Are there any plans to extend the compiler? If you were to, how might this be done?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions