export class AppComponent implements OnInit {
movieList: Observable<any>;
constructor(private AppService:AppService){
}
ngOnInit() {
this.getMovies();
}
getMovies() {
this.movieList = this.AppService.getMovies().map(movie => {
return {
name: movie.name
}
});
this.movieList.subscribe(data => {
debugger;
})
}
}
I want to perform Rxjs operations on observable this.movieList but Data in debugger returns undefined when i subscribe to this.movieList