Skip to content

Commit

Permalink
fix(bootstrap): only add customProviders when present
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Jun 22, 2016
1 parent c7fa949 commit 0e9e85c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/config/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function ionicProviders(customProviders?: Array<any>, config?: any): any[
setupDom(window, document, config, platform, clickBlock, featureDetect);
bindEvents(window, document, platform, events);

return [
let providers: any[] = [
App,
provide(ClickBlock, {useValue: clickBlock}),
provide(Config, {useValue: config}),
Expand All @@ -136,9 +136,14 @@ export function ionicProviders(customProviders?: Array<any>, config?: any): any[
Translate,
TapClick,
provide(PLATFORM_DIRECTIVES, {useValue: IONIC_DIRECTIVES, multi: true}),
HTTP_PROVIDERS,
customProviders
HTTP_PROVIDERS
];

if (isPresent(customProviders)) {
providers.push(customProviders);
}

return providers;
}


Expand Down

0 comments on commit 0e9e85c

Please sign in to comment.