Part of the DOM continuously getting refreshed in Angular 5. While trying to fetch videos from YouTube API
Calling Youtube API in ngOnInit(){ var finalURL = "https://www.googleapis.com/youtube/v3/search?key="+this.api+"&channelId="+this.chanId+"&part=snippet,id&order=date&maxResults="+this.result+"" console.log(finalURL); this.obser$ = this.http.get(finalURL).subscribe(response=>{ console.log(response); let ytresults= response.json(); console.log(ytresults); ytresults.items.forEach(obj => { console.log(obj.id.videoId); this.ytvideolist.push(obj.id.videoId); }); console.log(this.ytvideolist); } trying here to make the video url sanitized <li *ngFor= "let id of ytvideolist"> <iframe [src]=