import { Injectable } from '@angular/core';
      import { HttpClient } from '@angular/common/http';
      
      @Injectable({providedIn: 'root'})
      export class ServiceNameService {
        constructor(private httpClient: HttpClient) { }
      }
      Typescript language logo
      your recipe card header background

      Angular Service HttpClient

      Angular TypeScript Recipes

      When an injectable is provided, the @Injectable annotation will automatically provide the httpClient object. This object will be used to make HTTP requests.

      Library: angular

      Shortcut: angular.service.httpclient

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.