Blame view
src/app/service/vessels.service.ts
426 Bytes
632c4ac2f import vessels |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import {Injectable} from '@angular/core'; import {BehaviorSubject, Observable} from 'rxjs'; import {Vessel} from '../model/vessel'; @Injectable({ providedIn: 'root' }) export class VesselsService { private vessels = new BehaviorSubject(new Map()); currentVessels = this.vessels.asObservable(); constructor() { } changeVesselsSet(newVessels: Map<number, Vessel>): void { this.vessels.next(newVessels); } } |