property subscribe doesn’t exisit on type Angular TypeScript

Solution:- Make sure you are using like this MyMethod().subscribe
e.g.
ngOnInit() {

    this.videos = this.videoserv.getvideos()
        .subscribe(responce => this.videos = responce);
}

Add Comment