Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Created July 18, 2017 08:24
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 cyrilletuzi/04dbeeaed0ef5c562b46af2892cbe752 to your computer and use it in GitHub Desktop.
Save cyrilletuzi/04dbeeaed0ef5c562b46af2892cbe752 to your computer and use it in GitHub Desktop.
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Movie } from '../models/index';
@Injectable()
export class CinemaService {
constructor(protected http: HttpClient) {}
getMovies() {
return this.http.get<Movie[]>(`/api/movies`);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment