Project Notes

This post is all about things I am learning while working on Angular.js Project. Will keep updating it with new stuff, hopefully.

  • Factory get initialized once but controller get executed every time we visit a page without refresh.

- Formatting currency with Rupee symbol and manage invalid values. gApp.filter('gCurrency', ['$filter', function ($filter) { return function (amount, currencySymbol) { if (amount = '' || amount = null || isNaN(amount)) return 'N/A'; else return $filter("currency")(amount, currencySymbol); }; }]);