//add dynamic routing table
The router. AddRoutes (store. State. AddRouters);
//the last add 404 page
The router. AddRoutes ([
{
Path: "*",
Redirect: "/404"
}
]);
Execution of the printed result code to add the routing table is the first to add dynamic routing array was successful but the second redirect page 404 no added so lead to go to the permissions page can hang directly rather than 404 page
Watch the instance of the everyone is like this why did I go wrong...
CodePudding user response:
First of all, you can output after dynamically register routing enclosing $router, check whether the routing registered in, then, view the corresponding components have registered 404 routing,CodePudding user response: