Skip to content

Instantly share code, notes, and snippets.

@YonathanMeguira
Created January 31, 2018 12:34
Show Gist options
  • Save YonathanMeguira/87eeb4b41fcaab31bf5d434afc2b295f to your computer and use it in GitHub Desktop.
Save YonathanMeguira/87eeb4b41fcaab31bf5d434afc2b295f to your computer and use it in GitHub Desktop.
app.module
/* Angular Modules */
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './routes.module';
import { HTTPListener, HTTPStatus } from './services/RxJS/HTTPListener.service';
const RxJS_Services = [HTTPListener, HTTPStatus];
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
FormsModule,
RouterModule,
AppRoutingModule
],
providers: [
...RxJS_Services
{
provide: HTTP_INTERCEPTORS,
useClass: HTTPListener,
multi: true
}
],
bootstrap: [AppComponent]
})
export class AppModule {}
@edusfc15
Copy link

Doesn't it suppose to have a comma after the "...RxJS_Services"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment