angular services[get&post]
insertPost ( data : any ){ return this . httpClient . post ( this . url1 , data , { responseType : 'text' }); } //rx js topic obeserver in angular? step 1:- services:--(apiFetch) AppModule.ts //for http call:--- import { HttpClientModule } from '@angular/common/http'; imports: [ HttpClientModule, ] step 2:-- getapi.service.ts:-- import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @Injectable({ providedIn: 'root' }) export class GetapiService { private url = 'http://jsonplaceholder.typicode.com/posts'; private url1="http://localhost:4000/myapp"; //this is post api address.. constructor(private httpClient: HttpClient) { } getPosts(){ return this.httpClient.get(this.url); } insertPosts(data:any){ return this.httpClient.post(this.url1,data); } } step 3:--...