title: Is there a way to access a variable from interceptor.service.ts in server.ts file in angular 6 universal?
body: <p>I need to access the "this.cacheFlag" variable from interceptor.service.ts into server.ts file at the root in my application.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>return next.handle(this.authReq).pipe(
      tap((event: HttpEvent&lt;any&gt;) =&gt; {
        if (event instanceof HttpResponse) {
          this.reqArray.push(event.status);
          this.cacheFlag = true; //this is the variable I want to access in server.ts file
  
        }
      }),
      catchError((error, caught) =&gt; {
        //intercept the response error and displace it to the console
        if (error instanceof HttpErrorResponse) {
          if(error.url.indexOf("detail?referenceCode=") == -1){
            this.reqArray.push(error.status);
            this.cacheFlag = false; //this is the variable I want to access in server.ts file
          }
     })
        </code></pre>
  </div>
  </div>
  </p>