UNPKG

1.26 kBPlain TextView Raw
1// The file contents for the current environment will overwrite these during build.
2// The build system defaults to the dev environment which uses `environment.ts`, but if you do
3// `ng build --env=prod` then `environment.prod.ts` will be used instead.
4// The list of which env maps to which file can be found in `.angular-cli.json`.
5
6import { ApplicationRef, NgModuleRef } from '@angular/core';
7import { enableDebugTools } from '@angular/platform-browser';
8import { IEnvironment } from '@armor/platform-browser';
9import { CONFIGURATION } from './config.dev';
10
11import 'zone.js/dist/long-stack-trace-zone';
12
13export const ENVIRONMENT: IEnvironment = {
14 configuration: CONFIGURATION,
15 hmr: false,
16 production: false,
17 showDevModule: true,
18
19 /** Angular debug tools in the dev console
20 * https://github.com/angular/angular/blob/86405345b781a9dc2438c0fbe3e9409245647019/TOOLS_JS.md
21 * @param modRef
22 * @return {any}
23 */
24 decorateModuleRef(modRef: NgModuleRef<any>) {
25 const appRef = modRef.injector.get(ApplicationRef);
26 const cmpRef = appRef.components[0];
27 const ng = (window as any).ng;
28 enableDebugTools(cmpRef);
29 (window as any).ng.probe = ng.probe;
30 (window as any).ng.coreTokens = ng.coreTokens;
31 return modRef;
32 }
33};