angular - 我想从我的 url 中删除 pages/ 角度 5
问题描述
我有 { path: 'pages/:id', component: PagesComponent },
这就是为什么我的网址看起来像
http://localhost:4200/pages/aboutus
因此,出于 SEO 的目的,我想从 URL 中删除该页面以显示 URL,例如
解决方案
首先,与“aboutus”相关的组件是什么(如果有的话)。我还建议您记录该指南,它的结构非常好。
推荐阅读
- spring - 以一种 Thymeleaf 形式创建两个不同对象的正确方法
- javascript - 将数据从 API 发送到谷歌电子表格
- firebase - 从 firebase/flutter 返回一个对象列表
- ruby-on-rails - 如何在 Rails 中验证字段,Active:Model::Validator
- lua - 我如何在 Lua 中设置最大年龄
- python - 创建一个元素列表并求和
- ios - 添加约束的行为不同,调整为先前值而不是新值
- c++ - 试图在函数内部的 ASM 中推送一个值,我做错了什么?
- python-3.x - 使用 Groupby 多列 Pandas 获取正值和负值计数
- python - Python Flask 中的各种错误