包含肝脏服务器中角度 6 项目参数的 url 的基本 href 链接是什么?



我需要打开使用 Angular 6 的第一页加载的基本 href 链接,例如

xyz.com/anexure/5。

这在我的本地主机中工作正常。但这在实时服务器中不起作用。

在实时服务器中,I 文件夹结构类似

xyz.com/annexture/annextureform

附件表单文件夹中,我有角度项目

索引.html

基本 href ="xyz.com/annexture/annextureform/">

app-routing.module.ts

const routes: Routes = [
{path: '', redirectTo: '/annexture/:id', pathMatch: 'full' },
{path: 'annexture/:id', component: AnnextureformComponent}
];

对于角度项目,我必须在htaccess文件中进行哪些更改?

如果将项目部署到其他文件夹中,则需要进行的更改是:

只有文件夹名称,而不是域文件夹名称

base href="annexture/annextureform/">

最新更新