Skip to content

Instantly share code, notes, and snippets.

@zkkmin
Created June 30, 2018 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zkkmin/8b8ba4c55812fa3e3a51d4dc7dae9522 to your computer and use it in GitHub Desktop.
Save zkkmin/8b8ba4c55812fa3e3a51d4dc7dae9522 to your computer and use it in GitHub Desktop.
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { HttpClient } from '@angular/common/http';
@Injectable({
providedIn: 'root'
})
export class QuoteService {
private quoteUrl = "https://talaikis.com/api/quotes/random/";
getQuote(): Observable <{}> {
return this.http.get(this.quoteUrl)
};
constructor(
private http: HttpClient
) { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment