4 import { enableDebugTools, disableDebugTools } from '@angular/platform-browser';
5 import { enableProdMode, ApplicationRef } from '@angular/core';
6 // Environment Providers
7 let PROVIDERS: any[] = [
8 // common env directives
11 // Angular debug tools in the dev console
12 // https://github.com/angular/angular/blob/86405345b781a9dc2438c0fbe3e9409245647019/TOOLS_JS.md
13 let _decorateModuleRef = function identity<T>(value: T): T { return value; };
15 if ('production' === ENV) {
19 _decorateModuleRef = (modRef: any) => {
27 // custom providers in production
32 _decorateModuleRef = (modRef: any) => {
33 const appRef = modRef.injector.get(ApplicationRef);
34 const cmpRef = appRef.components[0];
36 let _ng = (<any>window).ng;
37 enableDebugTools(cmpRef);
38 (<any>window).ng.probe = _ng.probe;
39 (<any>window).ng.coreTokens = _ng.coreTokens;
46 // custom providers in development
51 export const decorateModuleRef = _decorateModuleRef;
53 export const ENV_PROVIDERS = [