Answers for "subject in angular service file"

0

subject in angular service file

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
Posted by: Guest on April-13-2022

Code answers related to "subject in angular service file"

Browse Popular Code Answers by Language