mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 13:32:54 +08:00
Custom providers
Added custom providers to bootstrap by adding "providers" parameter to args object
This commit is contained in:
@ -50,7 +50,10 @@ export function App(args={}) {
|
||||
// redefine with added annotations
|
||||
Reflect.defineMetadata('annotations', annotations, cls);
|
||||
|
||||
bootstrap(cls, ionicProviders(args)).then(appRef => {
|
||||
// define array of bootstrap providers
|
||||
let providers = ionicProviders(args).concat(args.providers || []);
|
||||
|
||||
bootstrap(cls, providers).then(appRef => {
|
||||
appRef.injector.get(TapClick);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user