Angular

Angular HTTPHeaders Example

In this guide let us explore how to add HTTP Headers to an HTTP request in Angular. There are two ways by which we can add the headers. One, we add the HTTP Headers while making a request. The second way is to use the HTTP interceptor to intercept all the Requests and add the Headers. In both cases, we use the httpHeaders configuration option provided by angular HttpClient to add the headers.

Angular HTTPHeaders Example Read More »

Angular HTTP POST Example

In this Angular Http Post Example, we will show you how to make an HTTP Post Request to a back end server. We use the HttpClient module in Angular. The Angular introduced the HttpClient Module in Angular 4.3. It is part of the package @angular/common/http. We will create a Fake backend server using JSON-server for our example. We also show you how to add HTTP headers, parameters or query strings, catch errors, etc.

Angular HTTP POST Example Read More »

Angular Canonical URL

This guide explains how to set Canonical URL links in Angular. Unlike the Meta Service & Title Service, the Angular does not have a Link Service. But we can manipulate the DOM using the dom object, which we can get by injecting the DOCUMENT DI Token. This token returns the dom object when the app runs on the browser. We can make use of it to add or update the Canonical URL in our app.

Angular Canonical URL Read More »

Scroll to Top