Skip to content

Commit

Permalink
In ArchwizardModuleConfig, take an instance of NavigationModeFactory …
Browse files Browse the repository at this point in the history
…rather than a constructor, which is more flexible and easy for the end user
  • Loading branch information
earshinov committed Mar 23, 2019
1 parent 54a6147 commit 016b542
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/archwizard.module.ts
Expand Up @@ -32,7 +32,7 @@ export interface ArchwizardModuleConfig {
* You may need a custom factory in order to support custom navigation modes.
* By default, [[BaseNavigationModeFactory]] is used.
*/
navigationModeFactory?: new() => NavigationModeFactory;
navigationModeFactory?: NavigationModeFactory;
}

/**
Expand Down Expand Up @@ -85,7 +85,7 @@ export class ArchwizardModule {
return {
ngModule: ArchwizardModule,
providers: [
{ provide: NAVIGATION_MODE_FACTORY, useClass: config && config.navigationModeFactory || BaseNavigationModeFactory },
{ provide: NAVIGATION_MODE_FACTORY, useValue: config && config.navigationModeFactory || new BaseNavigationModeFactory() },
]
};
}
Expand Down

0 comments on commit 016b542

Please sign in to comment.