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 adding 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.