Skip to main content
1 de 2
     use lo siguiente pero dudo que sea una buena alternativa.

 private delay(ms: number)
     {
       return new Promise(resolve => setTimeout(resolve, ms));
     }
    
     private async sleep()
     {
       await this.delay(1000);
     }





 addGenres(){
    this._GenreService.createGenrer(this.addGenre)
      .subscribe
      (
        data=>
        {
          this.sleep().then(() => this.listgenre());

        }
      )

  }