Friday, 15 March 2013

extjs4.2 - Extjs tpl for number format -


I'm new to extras, how can I format numbers in TPL?

This is my code:

  {xtype: 'panel', tpl: ['& lt; P & gt; Number: {myDataNumber} & lt; / P & gt; ']}   

I am searching for Extra APIs for TPL. But I could not find the number for TPL. Would you please help me

ExtJS tpl Ext for easy formatting using methods The Ut.format class allows, which can be implemented with the following syntax:

    

Of course, you can specify the format that you need to format numbers.

In addition, if none of the built-in format functions works, you can always add it to Ext.util.Format for a specific template Singleton) or specify a custom member function (see Ext.XTemplate docs). Either way, you can apply any format that you can imagine ... just depends on what is the best way to suit your needs.

No comments:

Post a Comment