Tag Archives: AngularJS

AngularJS – Format Cents As Monetary Unit (Dollars, Rand etc)

1. Create a filter app.filter(’MonetaryUnit’, function () { return function (amount) { return (amount / 100).toFixed(2); } }); 2. Apply filter to field {{someField | MonetaryUnit}} For example, if someField has a value of “2000” it will render as “20.00”.

Posted in Programming | Tagged | Leave a comment

Submit HTML form using AngularJS

The payment gateway I’m integrating with requires a post from a form to navigate to their payment page. Some of the information I need to post is dependent on the results from a call to my back end server. My … Continue reading

Posted in Programming | Tagged , | Leave a comment