Commit 98383eb5 authored by Ratnadeep Rajendra Kharade's avatar Ratnadeep Rajendra Kharade
Browse files

Created service to share map data between Hire page and map component

parent b7a95e89
import { TestBed } from '@angular/core/testing';
import { MapDataService } from './map-data.service';
describe('MapDataService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: MapDataService = TestBed.get(MapDataService);
expect(service).toBeTruthy();
});
});
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class MapDataService {
mapDataSubject = new Subject<any>(); //Decalring new RxJs Subject
constructor() { }
sendDataToOtherComponent(somedata) {
this.mapDataSubject.next(somedata);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment