当前位置:网站首页>router---mode
router---mode
2022-08-04 13:03:00 【monstkl】
One, hash mode
The default mode is hash modePrinciple: window.onhashchange eventIt is not the real page address, but is passed to the single-page file in the form of parameters. Just make sure that the file path of index.html is real.Second, history mode
new Router({mode: 'history',routes: []})Principle: window.history.pushState completes URL jumping, this mode requires back-end support, because custom paths such as http://xxx/ are not available in single-page applicationsBack-end support mode 1:The server needs to add candidate resources for all cases so that they all return the same index.html fileBack-end support mode 2:Add a simple fallback route on the server, if the URL does not match any static resources, serve the index.html file边栏推荐
猜你喜欢
随机推荐
A comprehensive understanding of MOS tubes, an article is enough
持续交付(二)PipeLine基本使用
“蔚来杯“2022牛客暑期多校训练营3 C
yum 查看已经安装过的包并卸载
广告电商系统开发之订单处理
Cows 树状数组
String is a reference type
Unity 3D模型展示框架篇之资源打包、加载、热更(Addressable Asset System | 简称AA)
Why don't young people like to buy Mengniu and Yili?
Motion Rule (16)-Union Check Basic Questions-Relations
视觉SLAM十四讲学习笔记 第7讲 视觉里程计
Systemui qsSetting添加新图标
跨链桥已成行业最大安全隐患 为什么和怎么办
代码越写越乱?那是因为你没用责任链!
Opencv学习之ORB特征提取和匹配
MFC的相机双目标定界面设计
【软考 系统架构设计师】软件架构设计② 软件架构风格
Do you understand the various configurations in the project?
双目立体视觉学习笔记(一)
面试官:如何查看/etc目录下包含abc字符串的文件?








