UNPKG

ohayolibs

Version:

Ohayo is a set of essential modules for ohayojp.

16 lines (12 loc) 370 B
import { Injectable } from '@angular/core'; import { BehaviorSubject, Observable } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class MobileService { private notify$ = new BehaviorSubject<boolean>(null!); next(value: boolean): void { this.notify$.next(value); } get change(): Observable<boolean> { return this.notify$.asObservable(); } }