component.ts
public deteleApp(e: any) {
console.log('Eliminar app', e);
swal({
title: this.message_swal['deleteTicket'].title,
text: this.message_swal['deleteTicket'].deleteApp,
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: this.message_swal['deleteTicket'].confirmDelete,
cancelButtonText: 'No'
}).then((result) => {
if (result.value) {
this.appsService.delApplication(e.id).subscribe((response) => {
this.spinner.show();
console.log('response del app', response);
this.getAppUser();
}, (error) => {
console.log(error);
});
}
});
嗨,我有一段代码,所以当我尝试登录并删除它的工作正常但是当我刷新页面并尝试删除它不起作用时,它给了我上述错误, 不仅如此,当我第一次尝试导航页面时,我有按钮它工作正常(https://localhost:4200/Planes-y-Precios-de-Aplicaciones-en-Facebook)但是如果刷新并尝试它给我一个信像这样的错误(无法匹配任何路由。URL 段:'undefined')https://localhost:4200/undefined