我无法重定向到在我的项目根目录中生成的变更量。当用户键入应用程序/changelog的URL时,我试图将用户重定向到这个变更量
例:http://myProject/changelog
我添加了新的组件changelog,但是当我导航到页面时,会出现一个空白屏幕。
changelog.routes.ts
export const changelogRoutes: Route[] = [
{
path: 'CHANGELOG',
component: ChangelogComponent
}
];changelog.component.html
<p>
<link href="//file/../../../../CHANGELOG.md" type="text/css" />
</p>changelog.module.ts
@NgModule({
declarations: [ChangelogComponent],
imports: [
RouterModule.forChild(changelogRoutes),
],
providers: [],
entryComponents: [ChangelogComponent]
})在项目project/changelog.md的根处生成changelog.md,而my app.routes在project/src/app/app.routes.ts生成。
发布于 2018-03-07 08:03:24
我通过将chagelog移动到应用程序中的一个文件夹并在嵌入标记html上传递生成的changelog来解决这个问题。
<embed src="assets/changelog/changelog.md" width=100% height=100% />https://stackoverflow.com/questions/49127826
复制相似问题