Angular 2 is the latest framework for building web applications using typescript. Recently, angular team is skipped the version 3.x because, router package is shipped with 3.x previously, so instead of putting into 3.x, choose to move to 4.x.

Monday, 26 December 2016

How to enable production mode in Angular2

Angular2 is running in development mode.call enableProdMode() to disable assertion checks and other checks in the production mode. To enable production mode, importing and executing the following function.
import { AppModule } from './app/app.module';
    import { enableProdMode } from '@angular/core';
import { AppModule } from './app/app.module';
if (process.env.ENV === 'production') {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule);

0 coment�rios:

Post a Comment

Labels

Online Training

Your Name :
Your Email: (required)
Your Message: (required)

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts