shared module should not provide singletons

This commit is contained in:
William Welling
2017-09-26 14:41:33 -05:00
parent 3e76752652
commit da3d0b412f

View File

@@ -1,4 +1,4 @@
import { NgModule, ModuleWithProviders } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
@@ -79,12 +79,5 @@ const PROVIDERS = [
] ]
}) })
export class SharedModule { export class SharedModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: SharedModule,
providers: [
...PROVIDERS
]
};
}
} }