angular - 以角度4处理多个html文件
问题描述
我想在 Angular4 中调用不同的 html 文件。
在我的项目中,我创建了目录 abc。目录结构如下:
abc-->app
src
Index.html
abc.html
*.css files
*.js files
*.json files
*.ts files
我想调用abc.html
page insted of index.html
。
怎么能做到这一点?
在Angular 4中可以吗?
如果是,比怎么样?
请建议我,如果可能的话,请提供一个例子。
解决方案
在您的 angular-cli.json 中:
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "abc.html", <----- Here you can specify the name
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
]
推荐阅读
- python - Heroku:无法部署,无法解析 procfile
- rust - 我无法在 Tauri 应用中检测到空闲时间
- flutter - 'RenderObject?' 类型的值 不能分配给“RenderBox”类型的变量
- java - 无法配置数据源:无法配置嵌入式数据源。原因:无法确定合适的驱动程序类
- laravel - Laravel 文件管理器 - 创建文件夹或文件事件
- linux - 如何在 github 工作流中创建文件夹?
- angular - 如何使用 MSAL 禁用 Angular 应用程序的日志
- swift - 存储 SwiftUI 视图数组
- javascript - 我无法控制台记录从终端上 POST 方法传递的文本字段中获取的数据
- python - 有没有其他方法可以集成 Amibroker 和 Python 而不是使用 OLE?