页面未找到 - Angular 4

时间:2017-09-21 14:42:35

标签: angular

当Angular 4中找不到某个页面时,是否有人知道如何重定向到另一个网址,因为@echo off set list=89 86 51 84 49 55 52 49 52 49 SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION ( FOR %%X IN (%list%) DO ( cmd /c exit %%X <nul set /p =!=exitcodeAscii! ) echo. )>>C:\TestConverters.txt pause 似乎无效(至少对我而言)?

1 个答案:

答案 0 :(得分:1)

确保在路由配置中为路径“error”定义路由,如果是,则将pathMatch:'full'添加到定义中

{ path: "error",  component: ErrorComponent  },
{ path: "**",  redirectTo: "/error", pathMatch: 'full'  }