1. There are two types of routing patterns in Vue
1. One is hash mode.
2. One is the history mode of H5.
2. Both the hash and history are from the BOM object. The BOM is from the window
4. Hash belongs to window.location, while history directly belongs to window
6. In the routing mode, when the hash value changes, no network request will occur. However, when the hash value changes, only the corresponding components will be updated and no network request will be sent.
7. The principle of history to implement routing history. Pushstate() has a history, sends network requests, and uses stack heap.
The biggest advantage of stack memory is: first in first out
8. Research a method: learn through three points
1. Understand what it does
2. Know what its parameter represents
3. Know what the return value is
History. Back() returns the previous level = = = history. Go (- 1)
history.forwords() === history.go(-1)
History. Replacestate() has no route to store memory and cannot return
Author: Jin Feifei
Mobile number (wechat synchronization): 17812718961
I hope this article can bring benefits to the friends who are learning the front-end or working friends. Don’t spray. If you have any suggestions, please give me more suggestions. Thank you!!!