OmelSoft

Angular is Running in the Development Mode

When deploying Ionic app to the live server I got the following message in the console.

Angular is running in the development mode. Call enableProdMode() to enable the production mode.

This has been fixed by importing the module on line 2 and calling the enableProdMode() function before bootstrap in the apps main.ts file.

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppModule } from './app.module';

enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);


Comments are closed.

Get more stuff

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.