title: Subject subscribe is not triggering in a component
body: <p>When I am trying to subscribe to Subject folder_id, it is not subscribing in the board component when I am passing the id in the files component.</p>
  <p>This boardId function is triggered when a button is pressed in the files component.
  The activateId is the id taken from the snapshot of the url.</p>
  <pre><code>  boardID(){
      this.apiService.folder_id.next(this.activateID.id);
      console.log(this.activateID.id);
    }
  </code></pre>
  <p>This is the ngOnInit in the boards component which has to subscribe the id that is emitted from the files component. But for some reason when I try to get the id in this component, it does not run this subscribe function.</p>
  <pre><code>  ngOnInit() {
      
      this.apiService.folder_id.subscribe(
        (_id : string) =&gt; {
         this.id = _id;
         console.log(this.id)
         
       }
     );
  
      this.page = 0;
      console.log('Screen width :', this.scrWidth, 'Screen height', this.scrHeight);
  
      // getting the 2D context of Canvas element
      this.canvasElement = this.canvas.nativeElement;
      this.ctx = this.canvasElement.getContext('2d');
      // setting the Width and Height to the canvas element
      this.renderer.setAttribute(this.canvasElement, 'width', this.scrWidth);
      this.renderer.setAttribute(this.canvasElement, 'height', this.scrHeight);
  
      // for background
      this.backgroundCanvas = this.background.nativeElement;
      this.renderer.setAttribute(this.backgroundCanvas, 'width', this.scrWidth);
      this.renderer.setAttribute(this.backgroundCanvas, 'height', this.scrHeight);
  
    }
  </code></pre>
  <p>Now this is the service.ts file :-</p>
  <pre><code>import { Injectable } from '@angular/core';
  import { HttpClient, HttpHeaders } from '@angular/common/http';
  import { Router } from '@angular/router';
  import { environment } from 'src/environments/environment';
  import { Subject } from 'rxjs';
  
  @Injectable({
    providedIn: 'root'
  })
  export class RestService {
  
    xAuthToken = null;
    boardId = null;
    gerBoardDetails = null;
    createFolderResponse = null;
    deleteFolderResponse = null;
  
    folder_id = new Subject&lt;string&gt;();
    
    constructor(private http: HttpClient, public router: Router) {}
  </code></pre>
  <p>Can someone please help me on this issue, I am stuck on this for many days now.
  Thank you.</p>