mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
prodMode setting in the @App decorator to be able to enable the Angular2 production mode
This commit is contained in:
@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user