Docs
Everything You Need to Know
Data Formatting
Intro
Your app is just a means of presenting data. But that data needs to be organized and formatted in a manner so that users can understand what they are seeing. ChocolateChip-UI provides methods to help you format your data.
- formatNumber
- sum
- currency
- formatTime
- sortDate
- sortNumbers
- sortNumbersDescending
You use these in a template to format the data being rendered by the view:
<script type="text/x-template"> <li> <h3>Item: ${ data.name }, Price: { $.currency(data.price) }</h3> </li> </script>