2018-05-08 03:42:32 +08:00
|
|
|
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
|
2019-07-21 01:52:47 +08:00
|
|
|
import {ApplicationRef, enableProdMode} from '@angular/core';
|
2018-05-08 03:42:32 +08:00
|
|
|
import {environment} from './environments/environment';
|
|
|
|
import {AppModule} from './app/app.module';
|
2019-07-21 01:52:47 +08:00
|
|
|
import {enableDebugTools} from '@angular/platform-browser';
|
2016-03-13 01:11:19 +08:00
|
|
|
|
2017-06-12 05:33:47 +08:00
|
|
|
if (environment.production) {
|
|
|
|
enableProdMode();
|
2019-07-21 01:52:47 +08:00
|
|
|
}
|
2016-05-04 23:20:21 +08:00
|
|
|
|
2019-07-21 01:52:47 +08:00
|
|
|
platformBrowserDynamic().bootstrapModule(AppModule).then(moduleRef => {
|
|
|
|
const applicationRef = moduleRef.injector.get(ApplicationRef);
|
|
|
|
const componentRef = applicationRef.components[0];
|
|
|
|
// allows to run `ng.profiler.timeChangeDetection();`
|
|
|
|
enableDebugTools(componentRef);
|
|
|
|
}).catch(err => console.error(err));
|