1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/main.ts

17 lines
668 B
TypeScript
Raw Normal View History

2018-05-08 03:42:32 +08:00
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
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';
import {enableDebugTools} from '@angular/platform-browser';
2016-03-13 01:11:19 +08:00
if (environment.production) {
enableProdMode();
}
2016-05-04 23:20:21 +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));