Last active
December 18, 2019 07:09
-
-
Save dimaxweb/f790e22bc4ace595b0ead183d06ed6db to your computer and use it in GitHub Desktop.
Enable debugTools Angular8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {ApplicationRef} from '@angular/core'; | |
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
import { AppModule } from './app/app.module'; | |
import {enableDebugTools} from '@angular/platform-browser'; | |
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 => window['console'].error(err)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment