Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ServicePage<T>

Type parameters

Hierarchy

Implements

Index

Constructors

Protected constructor

Properties

backgroundPages

backgroundPages: Map<any, ServicePage<T>>

ServicePages which are running as a child of the current page.

Protected internalMemory

internalMemory: Namespace

Private loaded

loaded: boolean

memory

service

service: T

state

state: State<T>

Methods

Protected Abstract _load

  • _load(): Promise<void>

Protected _unload

  • _unload(): Promise<void>

Protected assignMemory

forget

  • forget(key: string, forgetNamespace?: undefined | false | true): void
  • Delete the value of the provided namespace key.

    Parameters

    • key: string
    • Optional forgetNamespace: undefined | false | true

      if true this operation behaves like Memory.resetMemory with the key as an argument. Otherwise it merely removes the specified namespace.

    Returns void

getBackgroundPage

  • getBackgroundPage(id: any): ServicePage<T> | undefined

injected

  • injected(el: Node, ns?: undefined | string): void

load

  • load(): Promise<void>
  • Load the service page. This is a no-op if the page is already loaded.

    Returns Promise<void>

registerBackgroundPage

  • registerBackgroundPage(page: ServicePage<T>, id: any): void

reload

  • reload(): Promise<void>

remember

  • remember(key: string, value: any): void
  • Store the given value under the namespace key.

    Parameters

    • key: string

      Namespaces are separated by a dot

    • value: any

    Returns void

removeInjected

  • removeInjected(...namespaces: string[]): void
  • Remove all elements from the given namespaces. Removing elements of a namespace also removes all elements in namespaces further down.

    If no namespaces provided removes all elements.

    Parameters

    • Rest ...namespaces: string[]

    Returns void

resetMemory

  • resetMemory(...namespaces: string[]): void
  • Reset the given namespaces and all their children.

    When called with no arguments this flushes the entire memory (i.e. deletes all keys).

    see

    Memory.forget to remove a specific namespace without affecting its children.

    Parameters

    • Rest ...namespaces: string[]

    Returns void

resetPage

  • resetPage(): void

transitionTo

unload

  • unload(): Promise<void>

Generated using TypeDoc