title: what does the multi: true attribute of HTTP_INTERCEPTORS mean?
body: <p>I'm new to Angular and I've just built an interceptor. According to multiple tutorials you have to include the <code>HTTP_INTERCEPTORS</code> in the <code>app.module</code> like so:</p>
  
  <pre><code>providers: [{ provide: HTTP_INTERCEPTORS, useClass: MyInterceptor, multi: true }]
  </code></pre>
  
  <p>I was wondering what that <code>multi: true</code> attribute means/does and whether it can be omitted or not.</p>
  
  <p>I've read the <a href="https://angular.io" rel="noreferrer">angular.io</a> guide about this attribute. They explain it as following:</p>
  
  <p>I don't understand this part: </p>
  
  <blockquote>
    <p>Note the multi: true option. This required setting tells Angular that
    HTTP_INTERCEPTORS is a token for a multiprovider that injects an array
    of values, rather than a single value.</p>
  </blockquote>
  
  <p>This sheds some light on the concept but I don't really understand yet when an interceptor is injecting multiple values and when it isn't. For example, my own interceptor is only changing the headers. Does this mean its injecting only a single value?</p>
  
  <p>This is my interceptor</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor, HttpHeaders } from '@angular/common/http';
  import { Observable } from 'rxjs/Observable';
  import { LoginService } from '../Services/login.service';
  
  
  @Injectable()
  export class JwtInterceptor implements HttpInterceptor {
  
      constructor(private loginService:LoginService){}
  
      intercept(request: HttpRequest&lt;any&gt;, next: HttpHandler): Observable&lt;HttpEvent&lt;any&gt;&gt; {
          // add authorization header with jwt token if available
          console.log("ik zit nu in de interceptor");
          let currentUser = this.loginService.getToken();
          if (currentUser !=="") {
  
              request = request.clone({
                  headers: new HttpHeaders({
                      'Content-Type': 'application/json', 
                      'Authorization': `Bearer ${currentUser}`
                  })
              });
          }
          return next.handle(request);
      }
  }
  </code></pre>
  
  <p>This is the provide list of app.module</p>
  
  <pre><code>  providers: [
      { provide: APP_BASE_HREF, useValue: '/' },
      { provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
      { provide: 'AUTH_URL', useValue: 'http://localhost:8080/auth' },
      { provide: 'API_URL', useValue: 'http://localhost:8080/api' },
      { provide: 'HEADERS', useValue: new HttpHeaders({'Content-Type': 'application/json'}) },
      LoginGuard,
      LoginService,
      UserService,
      MessageService
    ],
  </code></pre>