DEV Community

CoderLegion
CoderLegion

Posted on • Updated on

production mode in angular

Disabling Angulars development mode turns off assertions and other checks. The syntax is

enablePrMode(): void with no parameters required. and it Retuns void.

This is how i enable it in production mode in Angular 6, Angular 7 or Angular 8, in Angular Project’s main.ts file, you can write following code:

import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}

Read more at kodlogs.com

Top comments (0)