BackgroundModule mahalo/app/scope

This module is responsible for dealing with scopes.

Index

Functions

getComponent

  • getComponent(key: string | number): Component
  • This function returns the component instance that holds the givenkey in the scope that is the binding context.

    It will first look if the key should be provided by the local componentwhich will be returned in that case.

    Otherwise it will return the parent scope if it is a component or callitself with the parent scope as binding context if it is also a scope.

    Example
    let component = getComponent.call(scope, 'myProperty');let value = component.myProperty;
    Parameters
    • key: string | number
    Returns Component