@Shashanksr wrote:
Hi Team,
filter(value) { this.loading.show();//shows loading circle this.videos = [];//defines this.videos as an empty array let temp = this.ytProvider.getVideos(value);//defines temp as our http call in yt provider //we subscrive to videos of category value here temp.subscribe(data => { data.forEach(res => { //if video is not present in videos array, we push it into the array if (this.videos.indexOf(res) == -1) { this.videos.push(res); } }); this.loading.hide();// hides loading circle }, err => { //shows error alert if there is an issue with our subscription let alert = this.alertCtrl.create({ message: JSON.stringify(err), buttons: ['OK'] }); this.loading.hide();//hides loading circle }); }
Here I am getting this error.
Property ‘subscribe’ does not exist on type ‘void’.
Posts: 1
Participants: 1