TypeScript functions optional parameters

Have you ever been in a situation where you want a function with the same name but with different parameters? Yeah, I’m talking about function overloading… Function overloading helps you define a function with the same name but with different signatures. But do JavaScript supports function overloading? No. There’s no function overloading in JavaScript, and…

Reading Local JSON present in an Angular 2 or 4 project

Recently I have been working on an angular 2 project which required reading of a local static JSON file present in the project folder itself. I searched over internet to find a way to read JSON and this is what I got: private _productURL = ‘api/products/products.json’; getProducts(): Observable<any> { return this._http.get(this._productURL).map((response : Response) => <any>…