How to enable production mode in Angular 2
error in console :
3000/node_modules/@angular/core/bundles/core.umd.js:3032 Angular is running in the development mode. Call enableProdMode() to enable the production mode.
solution :
open main.ts file in src folder and paste these line
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import {enableProdMode} from '@angular/core';
enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);
3000/node_modules/@angular/core/bundles/core.umd.js:3032 Angular is running in the development mode. Call enableProdMode() to enable the production mode.
solution :
open main.ts file in src folder and paste these line
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import {enableProdMode} from '@angular/core';
enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);
Comments
Post a Comment