Skip to content
Snippets Groups Projects
Commit e3c7aa2f authored by Bilal Hassan's avatar Bilal Hassan
Browse files

adding shared service

parent 034b5209
No related branches found
No related tags found
3 merge requests!25Draft: Resolve #78,!7fixUrlPath,!4merge dev into main
import { TestBed } from '@angular/core/testing';
import { SharedServiceService } from './shared-service.service';
describe('SharedServiceService', () => {
let service: SharedServiceService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(SharedServiceService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class SharedService {
private numberSource = new Subject<number>();
number$ = this.numberSource.asObservable();
setNumber(number: number) {
this.numberSource.next(number);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment