【发布时间】:2019-10-16 23:26:33
【问题描述】:
我正在启动一个新的 Angular 应用程序。它在 localhost:4200 上按预期呈现,直到我打开这个:
@NgModule({
declarations: [
AppComponent,
HeaderBannerComponent,
MainContentComponent,
FooterContentinfoComponent
],
imports: [
BrowserModule,
AppRoutingModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
}
进入这个:
@NgModule({
declarations: [
AppComponent,
HeaderBannerComponent,
MainContentComponent,
FooterContentinfoComponent
],
imports: [
BrowserModule,
AppRoutingModule,
MsalModule.forRoot({ // added
clientID: msal.clientId, // added
authority: `https://login.microsoftonline.com/${msal.tenantId}/`, // added
}) // added
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
}
尽管如此,服务器说它“编译成功”。没有显示异常。但是我所有的 HTML 都消失了,并且 localhost:4200 的浏览器呈现了一个完全空白的页面。
有什么注意事项吗?
【问题讨论】:
-
浏览器控制台中也没有任何内容?
-
谢谢,我不知道那里会显示异常。我会尝试自己了解发生了什么,我认为这将有助于我学习。
标签: angular typescript msal