【发布时间】:2021-02-21 02:23:45
【问题描述】:
我在 client.add.component.ts 中有这段代码,想对重复条目进行错误处理。我目前在控制台中收到 503 错误。
this.clientsSvc.createClient(client).subscribe(x => this.router.navigate(['../'], {relativeTo: this.route}));
如何在上面的代码中加入下面这行代码?
this.snackBar.open(`Duplicate Client Name`, null, {duration: 3000});
【问题讨论】:
标签: angular error-handling snackbar