import { NgModule , ModuleWithProviders } from "@angular/core" ; import { CommonModule } from "@angular/common" ; import { FormsModule , ReactiveFormsModule } from "@angular/forms" ; import { AuthService } from "../../../services/AuthService" ; import { HttpModule , JsonpModule } from "@angular/http" ; import { CommBroker } from "../../../services/CommBroker" ; @ NgModule ( { imports : [ CommonModule , FormsModule , HttpModule , JsonpModule , ReactiveFormsModule ] , declarations : [ ] , exports : [ CommonModule , FormsModule , HttpModule , JsonpModule , ReactiveFormsModule ] } ) export class SharedModule { static forRoot ( ) { return { ngModule : SharedModule , providers : [ AuthService , CommBroker ] } ; } }