Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Created July 18, 2017 08:24
Embed
What would you like to do?
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