Created
August 29, 2019 19:37
-
-
Save nanotroy/f6a00d2983877fc5d91d5546f0a3bfed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { HttpClient } from '@angular/common/http'; | |
import { Observable } from 'rxjs'; | |
import { Injectable } from '@angular/core'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class EchoService { | |
constructor(private httpClient: HttpClient) {} | |
public makeCall(): Observable<any> { | |
return this.httpClient.get<any>('https://jsonplaceholder.typicode.com/posts/1'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment