项目初始化
This commit is contained in:
27
src/main.ts
Normal file
27
src/main.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { enableProdMode, ViewEncapsulation } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { preloaderFinished } from '@delon/theme';
|
||||
import { NzSafeAny } from 'ng-zorro-antd/core/types';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
preloaderFinished();
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic()
|
||||
.bootstrapModule(AppModule, {
|
||||
defaultEncapsulation: ViewEncapsulation.Emulated,
|
||||
preserveWhitespaces: false
|
||||
})
|
||||
.then(res => {
|
||||
const win = window as NzSafeAny;
|
||||
if (win && win.appBootstrap) {
|
||||
win.appBootstrap();
|
||||
}
|
||||
return res;
|
||||
})
|
||||
.catch(err => console.error(err));
|
||||
Reference in New Issue
Block a user