Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49253

Help with RXJS

$
0
0

@bbroerman wrote:

Can anyone help me refactor this code so that I can call another function after ALL of the videoService get’s have finished?

this.teams.map((team:any) => {
        team.Assignments.map((a: Assignment) => {
          return this.videoService.getById(a.VideoId).subscribe(
            res => {
              let e = new Event();
              e.Id = a.Id;
              e.title = a.Name;
              e.location = '';
              e.message = a.Notes;
              e.startDate = a.StartDate;
              e.endDate = a.EndDate;
              e.video = res;
              e.team = team.Name;
              this.eventList.push(e);
            },
            err => {

          });
        })
      })

Thanks for any and all help!

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 49253

Trending Articles