• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import { Injectable } from '@angular/core';
2import { BehaviorSubject, Observable } from 'rxjs';
3
4@Injectable({
5  providedIn: 'root',
6})
7export class SelectionService {
8  private selectedGoldenSource = new BehaviorSubject<string | null>(null);
9  selectedGolden$: Observable<string | null> =
10    this.selectedGoldenSource.asObservable();
11
12  constructor() {}
13
14  setSelectedGolden(goldenId: string | null): void {
15    this.selectedGoldenSource.next(goldenId);
16  }
17}
18