当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
DateTimeFormatter api
【黑马早报】尚乘数科上市13天,市值超阿里;北大终止陈春花聘用合同;新东方花近200亿退学费和遣散费;张小泉75%产品贴牌代工...
“蔚来杯“2022牛客暑期多校训练营4 N
LeetCode_424_替换后的最长重复字符
汉诺塔怎么玩
《社会企业开展应聘文职人员培训规范》团体标准在新华书店上架
持续交付(三)Jenkinsfile语法使用介绍
搭建ros交叉编译环境(从x86到nvidia arm)
Ultra-QuickSort
牛客网刷题记录 || 链表
高手,云集在于REST、gRPC 和 GraphQL之间!
他是“中台”之父,凭一个概念为阿里狂赚百亿
A Collection of Flutter Tutorials (2022 Edition)
Cows 树状数组
MFC的相机双目标定界面设计
一分钟认识 IndexedDB 数据库,太强大了!
年轻人为什么不喜欢买蒙牛、伊利了?
Diffusion Models:生成扩散模型
云原生Devops 的实现方法
[UML] Summary of Information System Analysis and Design Knowledge Points