Skip to content

Instantly share code, notes, and snippets.

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
You can’t perform that action at this time.