MergeInjector | ui-router-ng2
Options
Menu

Class MergeInjector

Merge two injectors

This class implements the Injector ng2 interface but delegates to the Injectors provided in the constructor.

Hierarchy

  • MergeInjector

Implements

  • Injector

Index

Constructors

Properties

Methods

Constructors

Properties

injectors: Injector[]
NOT_FOUND: object

Type declaration

Methods

  • get(token: any, notFoundValue?: any): any
  • Get the token from the first injector which contains it.

  • Get the token from the first injector which contains it.

    Delegates to the first Injector.get(). If not found, then delegates to the second Injector (and so forth). If no Injector contains the token, return the notFoundValue, or throw.

    Parameters

    • token any
      :

      the DI token

    • notFoundValue: Optional  any
      :

      the value to return if none of the Injectors contains the token.

    Returns any

    :

    the DI value


Generated using TypeDoc