mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 08:20:13 +01:00
refactor(auth): move auth into core module
This commit is contained in:
parent
75dd743244
commit
671056ddd9
4 changed files with 32 additions and 30 deletions
|
|
@ -1,17 +1,34 @@
|
|||
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NbAuthModule, NbDummyAuthProvider } from '@nebular/auth';
|
||||
|
||||
import { throwIfAlreadyLoaded } from './module-import-guard';
|
||||
import { DataModule } from './data/data.module';
|
||||
|
||||
const NB_CORE_PROVIDERS = [
|
||||
...DataModule.forRoot().providers,
|
||||
...NbAuthModule.forRoot({
|
||||
providers: {
|
||||
email: {
|
||||
service: NbDummyAuthProvider,
|
||||
config: {
|
||||
delay: 1000,
|
||||
login: {
|
||||
rememberMe: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}).providers,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
],
|
||||
exports: [
|
||||
NbAuthModule,
|
||||
],
|
||||
declarations: [],
|
||||
})
|
||||
export class CoreModule {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue