Last active
July 4, 2019 10:43
-
-
Save balocodes/0236d64d1c9f25531d995aec674f5c7a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from "@angular/core"; | |
import * as Rx from "rxjs"; | |
@Injectable() | |
export class CommsService { | |
// Observable with initial value set to false | |
private waitingListStatus = new Rx.BehaviourSubject(false); | |
// Updates the value of waitingListStatus | |
updateWaitingList = (status: boolean) => { | |
// Updates it's current value and notifies subscribers | |
this.waitingListStatus.next(status); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment