Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, OnInit } from '@angular/core';
- import { MoviesService } from 'src/app/services/movies.service';
- @Component({
- selector: 'app-movies',
- templateUrl: './movies.component.html',
- styleUrls: ['./movies.component.scss']
- })
- export class MoviesComponent implements OnInit {
- movies:any = [];
- constructor(private moviesService: MoviesService) { }
- ngOnInit() {
- this.moviesService.getMovies()
- .then(response => {
- this.movies = response;
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement