1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/model/version.service.ts
2019-02-15 11:47:09 -05:00

20 lines
388 B
TypeScript

import {Injectable} from '@angular/core';
import {BehaviorSubject} from 'rxjs';
@Injectable()
export class VersionService {
public version: BehaviorSubject<string>;
constructor() {
this.version = new BehaviorSubject<string>(null);
}
public onNewVersion(version: string) {
if (this.version.value === version) {
return;
}
this.version.next(version);
}
}