Blame view
src/app/service/vessels.service.ts
408 Bytes
632c4ac2f import vessels |
1 |
import {Injectable} from '@angular/core'; |
de59ffef8 add model + search |
2 3 |
import {BehaviorSubject} from 'rxjs'; import {Vessels} from '../model/vessels'; |
632c4ac2f import vessels |
4 5 6 7 8 |
@Injectable({ providedIn: 'root' }) export class VesselsService { |
de59ffef8 add model + search |
9 |
private vessels = new BehaviorSubject(new Vessels()); |
632c4ac2f import vessels |
10 11 12 13 |
currentVessels = this.vessels.asObservable(); constructor() { } |
de59ffef8 add model + search |
14 |
changeVesselsSet(newVessels: Vessels): void { |
632c4ac2f import vessels |
15 16 17 |
this.vessels.next(newVessels); } } |