To make HTTP Requests in Angular we use the methods of HttpClient class which is defined in the @angular/common/http package. HttpClient uses XMLHttpRequest browser API behind the scenes. HttpClient class provides the following methods each corresponding to the different HTTP verbs: get post put delete patch head jsonp HttpClient provides several methods for making HTTP requests […]
Angular CLI is Angular command line interface which simplifies common tasks when working with Angular 2+ applications Unlike AngularJS setting up Angular 2+ application takes time since various files are required in any Angular 2+ application.These are files such as configuration files,type script files and css.For simplifying creation of these files Angular CLI could be […]
URLs identify resources which the user can request from the server.For example to request products from a website user could append the following to the domain of the website.
But this url might also contain specific details which user wants to request such as the product id.User can pass these details in the url […]
Checking for undefined in ngFor in Angular 6 We use ngFor loop in Angualr 6 for iterating through list of items.Before iterating we should check whether the collection used in the ngFor contains any elements.We can check if collection contains any elements by using the following syntax:
names is a string colllection defined as:
We check if names is not undefined […]