Answers for "InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe'"

0

InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe'

export class MoviesComponent implements OnInit {
  movies: any[];

  constructor(private moviesDb: MoviesService) { }

  ngOnInit() {
    this.moviesDb.get().subscribe((snaps) => {
       this.movies = snaps;
   });
 }
}
Posted by: Guest on January-20-2021

Browse Popular Code Answers by Language