angular - 为什么 Angular-Core 会抛出“无法解析 ApplicationModule 的所有参数”
问题描述
所以首先我知道有一些帖子,但我的问题似乎并不相关(尝试了一堆,甚至使用了一些)。我也是这个项目的新手,我以前没有做过这样的 Angular(所以请善待)
该项目的引导程序如...
@NgModule({
imports: [
ApplicationModule,
],
...
})
我的代码得到了这个 Angular 函数......
CompileMetadataResolver.prototype._getTypeMetadata = function (type, dependencies, throwOnUnknownDeps) {
if (dependencies === void 0) { dependencies = null; }
if (throwOnUnknownDeps === void 0) { throwOnUnknownDeps = true; }
var identifier = this._getIdentifierMetadata(type);
return {
reference: identifier.reference,
diDeps: this._getDependenciesMetadata(identifier.reference, dependencies, throwOnUnknownDeps),
lifecycleHooks: getAllLifecycleHooks(this._reflector, identifier.reference),
};
};
标识符是
reference: ƒ ApplicationModule(appRef)
arguments: (...)
caller: (...)
ɵinj: {providers: Array(9), imports: Array(0), factory: ƒ}
length: 1
name: "ApplicationModule"
prototype: {constructor: ƒ}
__annotations__: [DecoratorFactory]
__proto__: ƒ ()
[[FunctionLocation]]: core.js:30477
[[Scopes]]: Scopes[3]
就我所知,这是来自 Angular 核心库的 ApplicationModule,这意味着 Angular 本身正在失败。
为什么 Angular 会以这种方式导致我的应用程序失败?
解决方案
推荐阅读
- python - 运行导入 glob 包以扫描 PDF 目录的 python 脚本时出现问题
- reactjs - React-native aplication database reads optimization
- ethereum - Ledger Nano-S 助记符到 MyEtherWallet
- jquery - 防止在数据表中单击行时重新排序
- xml - windows7 cygwin perl XML::Parser libexpat*:安装失败
- javascript - Java 和 JavaScript 中的逻辑相似,但 DFS 的结果不同
- python - 我正在用 discord.py 制作一个音乐机器人,但我在播放命令时遇到了一些问题
- java - 如何使框架/面板适合具有固定宽度但可变高度的文本标签
- excel - 在 DAX 中使用 QUARTILES 计算
- javascript - Vue,以“xhxxm”格式添加/增加时间