当前位置:网站首页>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边栏推荐
猜你喜欢

ShanDong Multi-University Training #4 A、B、C、G

"Lonely Walking on the Moon" is a powerful medicine, it can't cure the internal friction of happy twist

A comprehensive understanding of MOS tubes, an article is enough

用过Apifox这个API接口工具后,确实感觉postman有点鸡肋......

技术分享| 小程序实现音视频通话

为什么密码云服务平台是云时代的必然之选?

Chinese valentine's day of young people crazy to make money, earn 140000 a week

03 多线程与高并发 - ReentrantLock 源码解析

持续交付(三)Jenkinsfile语法使用介绍

“蔚来杯“2022牛客暑期多校训练营4 N
随机推荐
rpm安装提示error: XXX: not an rpm package (or package manifest):
8/3 训练日志 (树状数组+区间覆盖+思维+01字典树)
面试官:如何查看/etc目录下包含abc字符串的文件?
“蔚来杯“2022牛客暑期多校训练营3 C
Access Huawei game anti-addiction, click the anti-addiction pop-up window, the game crashes
CReFF缓解长尾数据联邦学习(IJCAI 2022)
du命令_set命令选项
RobotFramework二次开发(一)
Arduino框架下I2S控制ADC采样以及PWM输出示例解析
封装、继承、多态的联合使用实现不同等级学生分数信息的统计
router---路由守卫
使用SQLServer复制数据库
LeetCode_3_无重复字符的最长子串
Oracle 19c 单实例 19.3.0 升级到19.11.0 详细教程
鲜花“刺客”收割七夕
罗振宇的A股梦,咋这么难圆?
MFC的相机双目标定界面设计
双目立体视觉学习笔记(一)
MogDB/openGauss 3.0 扩容及缩容
Launcher app prediction