feat(core): introduce ModuleWithProviders
.
Modules can now provider helper functions that allow to import a module together with an array of providers. Part of #10043
This commit is contained in:
@ -14,7 +14,7 @@ import {AnimateCmp} from './animate';
|
||||
import {BasicComp} from './basic';
|
||||
import {CompWithAnalyzeEntryComponentsProvider, CompWithEntryComponents} from './entry_components';
|
||||
import {CompWithProviders, CompWithReferences} from './features';
|
||||
import {CompUsingRootModuleDirectiveAndPipe, SomeDirectiveInRootModule, SomeLibModule, SomePipeInRootModule, SomeService} from './module_fixtures';
|
||||
import {CompUsingRootModuleDirectiveAndPipe, SomeDirectiveInRootModule, someLibModuleWithProviders, SomePipeInRootModule, SomeService} from './module_fixtures';
|
||||
import {ProjectingComp} from './projection';
|
||||
import {CompWithChildQuery, CompWithDirectiveChild} from './queries';
|
||||
|
||||
@ -25,7 +25,7 @@ import {CompWithChildQuery, CompWithDirectiveChild} from './queries';
|
||||
CompWithDirectiveChild, CompUsingRootModuleDirectiveAndPipe, CompWithProviders,
|
||||
CompWithReferences
|
||||
],
|
||||
imports: [BrowserModule, FormsModule, SomeLibModule],
|
||||
imports: [BrowserModule, FormsModule, someLibModuleWithProviders()],
|
||||
providers: [SomeService],
|
||||
entryComponents: [
|
||||
AnimateCmp, BasicComp, CompWithEntryComponents, CompWithAnalyzeEntryComponentsProvider,
|
||||
|
Reference in New Issue
Block a user