Assunto no arquivo de serviço angular

import { Injectable } from '@angular/core';  
import { Subject } from 'rxjs';  
  
@Injectable({  
  providedIn: 'root'  
})  
export class DataSharingService {  
  
  SharingData = new Subject();  
  constructor() { }  
}  

//use this service in three different component using subject:give the same output for all fields
30_Savaliya Denish