From eccb29138eb7eac58d7d109dba5bf6175602bf9a Mon Sep 17 00:00:00 2001 From: troyanskiy Date: Tue, 22 Dec 2015 13:09:02 +0300 Subject: [PATCH] Custom providers Added custom providers to bootstrap by adding "providers" parameter to args object --- ionic/decorators/app.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ionic/decorators/app.ts b/ionic/decorators/app.ts index 071598cbe1..70e85f7176 100644 --- a/ionic/decorators/app.ts +++ b/ionic/decorators/app.ts @@ -49,8 +49,11 @@ export function App(args={}) { // redefine with added annotations Reflect.defineMetadata('annotations', annotations, cls); + + // define array of bootstrap providers + let providers = ionicProviders(args).concat(args.providers || []); - bootstrap(cls, ionicProviders(args)).then(appRef => { + bootstrap(cls, providers).then(appRef => { appRef.injector.get(TapClick); });