hostinger webhosting in hindi,how to upload file on hostinger,hpanel file upload in hostinger hindi/english,8677040031,hpanel file manager file upload hostinger,blog.marketingdukaan.com,how to use hostinger file manager (updated 2020) in hindi and english,mukund programming tutorials,how to open wordpress dashboard in hostinger,hostinger tutorial in hindi,hostinger web hosting review in hindi
How to call API in angular & with an example of PHP API . Software required:- Node -> https://nodejs.org/en/download/ VS Code -> https://code.visualstudio.com/download Angular CLI -> npm install - g @angular / cli To understand how to call API in angular follow the below steps:- Step:1 Project Setup 1. Create a project in angular -> ng new project name 2. Install npm -> npm i 3. Import HttpClientModule in app.module.ts -> import { HttpClientModule } from '@angular/common/http' ; 4. Add provider providers : [ WebserviceService ], example -> ng new crudInAngularPHP Step:2 API Service 1. Create a service with name webservice -> ng g s services/webservice 2. import modules import { HttpClient, HttpHeaders, HttpRequest, HttpEvent } from '@angular/common/http'; 3 . C all constructor constructor( private http: HttpClient) 4. Add a common function to get a response of API with name postRequest:- ...
Comments
Post a Comment