0
這是我的刪除功能中調用該服務的代碼。訂閱中的成功部分工作不正常,因爲toastr沒有出現在新頁面上。但它會出現在頁面之前(導航到另一頁使其消失)。Toastr路由到不同頁面時不工作
this._meetupService.deleteMeetup(id).subscribe(
() => {this._router.navigate(['/meetups']),
this.toastr.success('Successfully Deleted!');},
error => this.errorMessage = <any>error);