angular.js - How to configure url in springMVC and angular's ui-router?
世界只因有你
世界只因有你 2017-05-15 17:06:42
0
3
662

As shown in the picture, when entering this page, it should be http://localhost:8020/home, but under the control of ui-route routing, after the function list is displayed, the address is http:/ where home becomes the function list. /localhost:8020/functio….

So, at this time, if you refresh the page http://localhost:8020/functio...
in the browser, 404 will appear.

Indeed, because in springMVC, there is no functionManagement page in view parsing. functionManagement is just a home view under the control of ui-router.

How to solve this problem?
When refreshing, instead of showing 404, can you display the home page?

世界只因有你
世界只因有你

reply all(3)
PHPzhong

Your front-end should be a single-page application, right? The back-end routing only needs to point to this single page, and the rest of the routing is controlled by the front-end.

淡淡烟草味

It is recommended to separate the front and backend. The backend only provides data, and the frontend routing is only responsible for the view layer

左手右手慢动作

Written the route on the front end, and then jump to the corresponding route on the back end

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template