Skip to content

Instantly share code, notes, and snippets.

View balocodes's full-sized avatar

Amin Balogun balocodes

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