4 import { enableDebugTools, disableDebugTools } from '@angular/platform-browser';
5 import { enableProdMode, ApplicationRef } from '@angular/core';
6 // Environment Providers
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(value) { return value; };
15 if ('production' === ENV) {
22 // custom providers in production
27 _decorateModuleRef = (modRef: any) => {
28 const appRef = modRef.injector.get(ApplicationRef);
29 const cmpRef = appRef.components[0];
31 let _ng = (<any>window).ng;
32 enableDebugTools(cmpRef);
33 (<any>window).ng.probe = _ng.probe;
34 (<any>window).ng.coreTokens = _ng.coreTokens;
41 // custom providers in development
46 export const decorateModuleRef = _decorateModuleRef;
48 export const ENV_PROVIDERS = [