Everything You Need to Know

Data Formatting


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">
    <h3>Item: ${ }, Price: { $.currency(data.price) }</h3>