<NME> main.ts
<BEF> import {enableProdMode} from '@angular/core'
import {platformBrowserDynamic} from "@angular/platform-browser-dynamic";

import {AppModule} from "./app/app.module";

enableProdMode();

platformBrowserDynamic().bootstrapModule(AppModule)
    .catch(err => console.log(err));
    platformBrowserDynamic().bootstrapModule(RootModule).catch(console.error)
}, 0)

<MSG> add angular environments

<DFF> @@ -2,8 +2,11 @@ import {enableProdMode} from "@angular/core";
 import {platformBrowserDynamic} from "@angular/platform-browser-dynamic";
 
 import {AppModule} from "./app/app.module";
+import { environment } from './environments/environment';
 
-enableProdMode();
+if (environment.production) {
+    enableProdMode();
+}
 
 platformBrowserDynamic().bootstrapModule(AppModule)
     .catch(err => console.log(err));

add angular environments