Blame view

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