You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi/ClientApp/src/app/home/home.component.ts

24 lines
706 B

import { Component, OnInit } from "@angular/core";
import { SearchService } from "../services";
import { ISearchMovieResult, ISearchTvResult } from "../interfaces";
@Component({
templateUrl: "./home.component.html",
})
export class HomeComponent implements OnInit {
public movies: ISearchMovieResult[];
public tvShows: ISearchTvResult[];
public defaultTvPoster: string;
constructor(private searchService: SearchService) {
}
public ngOnInit() {
this.defaultTvPoster = "../../../images/default_tv_poster.png";
this.searchService.popularMovies().subscribe(x => this.movies = x);
this.searchService.popularTv().subscribe(x => this.tvShows = x);
}
}