Format and/ or replace strings

Hi all,

I want to know how to format a string of a given control inside an each loop.

In my case I retrieve the results from an api and some fields are not at the format that I want to display, for example, a date field. In plain javascript what I would done was to create a function and call it inside the loop, passing the unformatted text as a parameter and retrieving the formatted one.

I tried to achieve that using the following syntax <MyComponent Text="{format(date)}"/> but without of luck.

Any suggestion? Thanks!

Hi!

I would recommend doing all formatting of data in JavaScript. Format the data into whatever you need and then expose that as observables to your UI.

There is also tons of formatting libs for JavaScript that will save you a lot of time, for example date.format