Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Observer

Implement a simple pub/sub pattern to have components communication without attributes. This class is Singleton, use getInstance to get the global obj.

Hierarchy

  • Observer

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Static Id

Id: Readonly<string> = "observer"

Methods

publish

  • publish(topic: string, info: any): void

subscribe

  • subscribe(topic: string, listener: func): { remove: () => void }

Static getInstance

  • getInstance(forceRecreate?: boolean): Observer

Generated using TypeDoc