angular - Angular - 在根应用程序中包含库文件
问题描述
我有一个js
包含多个 js 文件的文件夹的库。
当我构建它时,我成功地将所有文件包含在构建的库中。所以,文件在dist/my-lib/lib/js
.
但是,例如,我无法从 URL 访问这些文件http://localhost:4200/lib/js
。我能怎么做 ?
解决方案
借助资产,您可以将所需的文件夹包含dist
到您想要的文件夹中。
角.json:
{
"projects": {
"my-app": {
"architect": {
"build": {
"options": {
"assets": [
"dist/my-lib/lib/js"
]
}
}
}
}
}
}
推荐阅读
- c++ - 在 windows10 VS Code 上使用 CMake 对 imread 的 opencv 未定义引用
- selenium - c# - Selenium 3.14.0 + BrowserStack - Webdriver 异常 - 接收失败和实例化失败
- html - 如何使用 Vue 绑定/替换 HTML 中的现有数据
- algorithm - 找到相邻元素差值至少为 k 的最长递增子序列
- php - How to set money format in PhpSpreadSheet?
- asp.net-mvc - 如何从视图获取 HTML 下拉列表值到 MVC 中的控制器?
- php - 我无法弄清楚这段代码有什么问题
- html - 无法让页脚停留在页面底部
- javascript - 如何使用css将下拉内容定位在下拉按钮后面
- css - 无法以角度加载旋转木马的引导 css