Detailed Discussion on the Difference between Angular Routing and Nodejs Routing

  • 2021-07-26 06:37:08
  • OfStack

1. I feel that the route of angualr. js is for a single page. Every time the route changes, only the state of the page changes, and the page itself does not jump

2. The route of express is aimed at multiple pages, that is to say, the page he makes, and the route switching is accompanied by the page switching

3. Therefore, it is recommended to use router of angular. js for routing changes within pages and express for routing between pages

After my own practice, I finally run angular in express environment, which is a beep dog. Enough for me.

First of all, the route of Express is in the background, and the route of Angular is in the foreground, which is the anchor points of html before, # login, # index and # user. See, there is a well number.

Secondly, Express can run Angular, but conversely, Angular can't run Express. I can jump to an Angular page in the route of Express, and then all operations can be played in the route of Angular, but at the end of playing, data interaction still needs to be sent to Express, which is the difference between them. This is how I practice it myself. I have different opinions. Welcome to leave a message.


Related articles: