Although they are both called routing, their starting points are different! Express routing is normal routing from domain.com/users , while vuejs routing is from domain.com/#users # is the root of vuejs and the root of express is / (of course all back-end languages The roots are also /)
express example (get user information): domain.com/users/1000
vuejs example (get user information) domain.com/#users/1000
What the two don’t want to do is that vue’s routing is front-end routing, which is the routing in single-page applications. The route in express is the path to the file or api interface on the server.
Vue is a front-end routing, express is a back-end routing, and the idea of vue is to separate the front and back ends. The back end only needs to provide the index.html entry, and other data is obtained through express's routing interface
Although they are both called routing, their starting points are different!
Express routing is normal routing from domain.com/users
, while vuejs routing is from domain.com/#users
# is the root of vuejs and the root of express is / (of course all back-end languages The roots are also /)
express example (get user information):
domain.com/users/1000
vuejs example (get user information)
domain.com/#users/1000
What the two don’t want to do is that vue’s routing is front-end routing, which is the routing in single-page applications. The route in express is the path to the file or api interface on the server.
Vue is a front-end routing, express is a back-end routing, and the idea of vue is to separate the front and back ends. The back end only needs to provide the index.html entry, and other data is obtained through express's routing interface