mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-27 19:56:10 +01:00
fix(services): fix providers for root, correctly apply another themes
This commit is contained in:
parent
bcae560f3b
commit
40aa2ed0ae
3 changed files with 16 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
|
@ -106,12 +106,6 @@ const NGA_VALIDATORS = [
|
|||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
],
|
||||
providers: [
|
||||
BaThemeConfigProvider,
|
||||
BaThemeConfig,
|
||||
...NGA_VALIDATORS,
|
||||
...NGA_SERVICES
|
||||
],
|
||||
exports: [
|
||||
...NGA_PIPES,
|
||||
...NGA_DIRECTIVES,
|
||||
|
|
@ -119,4 +113,15 @@ const NGA_VALIDATORS = [
|
|||
]
|
||||
})
|
||||
export class NgaModule {
|
||||
static forRoot(): ModuleWithProviders {
|
||||
return <ModuleWithProviders> {
|
||||
ngModule: NgaModule,
|
||||
providers: [
|
||||
BaThemeConfigProvider,
|
||||
BaThemeConfig,
|
||||
...NGA_VALIDATORS,
|
||||
...NGA_SERVICES
|
||||
],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue