February 2010
Beginner
400 pages
11h 13m
English
When you bind data, you might want to perform some processing on a value before rendering it. For example, maybe you don't need the level of precision the data has, or perhaps you want to convert it to a different measurement or format it to the user's current locale. This can be accomplished with a converter that is simply a standard JavaScript function.
This example creates a function to uppercase a string:
function ToUpper(Input) {
return Input.toUpperCase();
}
This function can then be used in binding like so:
<div class=""> {binding Name, convert=ToUpper} </div>