Skip to content

Instantly share code, notes, and snippets.

Created July 18, 2017 08:24
What would you like to do?
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Movie } from '../models/index';
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