Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import { Component, OnInit } from '@angular/core';
  2. import { MoviesService } from 'src/app/services/movies.service';
  3.  
  4. @Component({
  5. selector: 'app-movies',
  6. templateUrl: './movies.component.html',
  7. styleUrls: ['./movies.component.scss']
  8. })
  9. export class MoviesComponent implements OnInit {
  10.  
  11. movies:any = [];
  12.  
  13. constructor(private moviesService: MoviesService) { }
  14.  
  15. ngOnInit() {
  16. this.moviesService.getMovies()
  17. .then(response => {
  18. this.movies = response;
  19. })
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement