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 { Component, OnInit } from "@angular/core"; | |
import { CommsService } from "../comms-service.ts"; | |
@Component({ | |
... | |
}) | |
export class FirstComponent implements OnInit { | |
listStatus; | |
constructor(public _commService: CommsService) {} | |
ngOnInit() { |
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) => { |