[ Meteor JS] – How to use a money mask

Have a lot of ways to do this, but here I will put an example with the pkg :

meteor add rainhaven:mask-money

https://github.com/plentz/jquery-maskmoney

Code in HTML file :

<template name="expenses">
<input type="text" class="price">
</template>

Code in JS file:

Template.expenses.rendered = function(){
    $('.price').maskMoney();
};

 

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s