iotgateway/IoTGateway/ClientApp/src/main.ts

28 lines
754 B
TypeScript
Raw Normal View History

2022-04-29 08:37:05 +00:00
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));