90得票29回答
Angular 9 - NGCC在处理时出现未处理的异常

将依赖项升级到Angular 9并进行必要的代码更改后构建应用程序会导致错误: 编译@angular/animations:es2015作为esm2015编译 @angular/animations:es2015作为esm2015编译 @angular/core:es2015作为esm201...

85得票8回答
无法解决依赖关系:npm ERR!peer @angular/compiler@“11.2.8”

我正在尝试在Heroku上部署我的应用程序。我之前遇到了“sh: 1: ng: not found”错误,但是在这里的回复中,我移动了@angular/cli、@angular-devkit/build-angular、@angular/compiler-cli和typescript。现在我遇...

13得票1回答
懒加载路由资源的懒命名空间对象

我将使用 Angular 编译器: const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin; 使用以下编译器选项: "angularCompilerOptions": { "genDi...

12得票1回答
"ngcc" 不被识别为内部或外部命令。

运行命令npm run ngcc会抛出错误'ngcc'不是内部或外部命令。package.json{ "scripts": { "ngcc": "ngcc" ... }, "dependencie...

7得票2回答
为什么使用router-outlet访问其他模块的组件不需要添加到导出中?

我不理解router-outlet和模块导出数组编译策略之间的区别。 router-outlet将通过ComponentFactoryResolver自动生成组件。 如果您没有使用router-outlet来访问其他模块的组件,则会从模板解析器引发错误。 为什么我们需要将它添加到e...

7得票3回答
空对象无法读取'config'属性。

我刚开始接触 Angular2,我下载了一个 Angular 2 项目并尝试进行设置。我安装了 Angular CLI 1.0.0-rc.2 版本,但当我运行 ng serve 命令时却出现以下错误: Cannot read property 'config' of null TypeEr...