angular - 部署失败时的角度 6 路由
问题描述
在我的本地,我运行解决方案,ng serve --base-href "/grant
并且我的网站和路由正常工作。当我部署并ng build --base-href /grant/
通过构建运行时,输出的网站有不正确的链接路由,没有添加 /grant/。我也试过ng build --base-href "/grant
没有成功
我的路线:
const routes: Routes = [
{
path: '',
component: SetupComponent
},
{
path: 'new-login',
component: NewLoginComponent
}
解决方案
推荐阅读
- python - 在 sklearn 中使用自定义评分功能
- python - 如何分别为散点图的点着色?
- beautifulsoup - BeautifulSoup:为什么它没有找到所有的 iframe?
- sql - Django本地服务器:来自文本文件的原子数据库
- azure - 如何通过 Terraform 或 ARM 部署应用服务扩展?
- batch-file - 如何在批处理文件中的for内的wmic开头设置%通配符
- macros - 如何在 Cognos SQL 提示查询中使用日期范围
- python - 那 k 意味着算法总是立即收敛吗?
- python - 如何使用 boto3 更新 API Gateway 中的 Lambda 函数版本?
- mysql - 按范围内的日期分组查询