mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 16:30:13 +01:00
28 lines
478 B
TypeScript
28 lines
478 B
TypeScript
|
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||
|
|
import { CommonModule } from '@angular/common';
|
||
|
|
|
||
|
|
import { UserService } from './users.service';
|
||
|
|
|
||
|
|
const SERVICES = [
|
||
|
|
UserService,
|
||
|
|
];
|
||
|
|
|
||
|
|
@NgModule({
|
||
|
|
imports: [
|
||
|
|
CommonModule,
|
||
|
|
],
|
||
|
|
providers: [
|
||
|
|
...SERVICES,
|
||
|
|
],
|
||
|
|
})
|
||
|
|
export class DataModule {
|
||
|
|
static forRoot(): ModuleWithProviders {
|
||
|
|
return <ModuleWithProviders>{
|
||
|
|
ngModule: DataModule,
|
||
|
|
providers: [
|
||
|
|
...SERVICES,
|
||
|
|
],
|
||
|
|
};
|
||
|
|
}
|
||
|
|
}
|