From fa1c75ffa030659d7c3a8b9f184e31e90eb96ee9 Mon Sep 17 00:00:00 2001 From: Erik Tufvesson Date: Sun, 14 Feb 2016 12:29:14 +0100 Subject: [PATCH] prodMode setting in the @App decorator to be able to enable the Angular2 production mode --- ionic/decorators/app.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ionic/decorators/app.ts b/ionic/decorators/app.ts index 70ff5ba7d6..4ca30cc35c 100644 --- a/ionic/decorators/app.ts +++ b/ionic/decorators/app.ts @@ -1,4 +1,4 @@ -import {Component} from 'angular2/core'; +import {Component, enableProdMode} from 'angular2/core'; import {bootstrap} from 'angular2/platform/browser'; import {TapClick} from '../components/tap-click/tap-click'; import {ionicProviders} from '../config/bootstrap'; @@ -57,6 +57,10 @@ export function App(args: any={}) { // define array of bootstrap providers let providers = ionicProviders(args).concat(args.providers || []); + if (args.prodMode) { + enableProdMode(); + } + bootstrap(cls, providers).then(appRef => { appRef.injector.get(TapClick); });