我们有这个Angular 7应用,其中包含以下软件包以及更多软件包,
"@angular/animations": "^7.0.0",
"@angular/common": "^7.0.0",
"@angular/compiler": "^7.0.0",
"@angular/core": "^7.0.0",
"@angular/forms": "^7.0.0",
"@angular/platform-browser": "^7.0.0",
"@angular/platform-browser-dynamic": "^7.0.0",
"@angular/router": "^7.0.0",
问题:
Browser Environment Works
Edge Live(IIS) No
Edge UAT(IIS) No
Edge Localhost Yes
Chrome\FF Live(IIS) Yes
Chrome\FF UAT(IIS) Yes
Chrome\FF Localhost Yes
通过不工作,我的意思是除了标题之外,它没有加载其他任何东西,并且控制台日志中没有错误。对angular 7还是陌生的,我不知道从哪里开始?
更新
基于评论中的有用建议,我做了ng --aot然后出现错误...
src \ app \ app.module.ts(60,32)中的ERROR:模板编译期间出错 装饰器中不支持'AppModule'函数调用,但是 名为“ BusyConfig”。
对于代码块,
@NgModule({
imports: [
.. some stuff
BusyModule.forRoot(new BusyConfig({
template: '<div class="my-loader"></div>'
})),
... so on ...
然后我在app.module文件的末尾添加了以下函数,
export function busyConfigFactory() {
return new BusyConfig({
template: '<div class="my-loader"></div>'
});
}
并将其添加到提供商中,
{ provide: BusyConfig, useFactory: busyConfigFactory }
并注释掉了BusyModule.forRoot(new BusyConfig ...块,但是现在我遇到了这个错误,
错误:无法绑定到“ ngBusy”,因为它不是的已知属性 'ng-container'。 1.如果“ ngBusy”是Angular指令,则将“ CommonModule”添加到此组件的“ @ NgModule.imports”。 2.要允许任何属性,请在此组件的“ @ NgModule.schemas”中添加“ NO_ERRORS_SCHEMA”。 (“] [ngBusy] =”忙“ 创建Ne“)