Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IProvideService

Hierarchy

  • IProvideService

Index

Methods

constant

  • constant(name: string, value: any): void
  • Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator.

    Parameters

    • name: string

      The name of the constant.

    • value: any

      The constant value.

    Returns void

decorator

  • decorator(name: string, decorator: Function): void
  • decorator(name: string, inlineAnnotatedFunction: any[]): void
  • Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.

    Parameters

    • name: string

      The name of the service to decorate.

    • decorator: Function

      This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:

      $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.

    Returns void

  • Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.

    Parameters

    • name: string

      The name of the service to decorate.

    • inlineAnnotatedFunction: any[]

      This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:

      $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.

    Returns void

factory

  • Parameters

    • name: string
    • serviceFactoryFunction: Function

    Returns IServiceProvider

  • Parameters

    • name: string
    • inlineAnnotatedFunction: any[]

    Returns IServiceProvider

provider

  • Parameters

    Returns IServiceProvider

  • Parameters

    • name: string
    • serviceProviderConstructor: Function

    Returns IServiceProvider

service

  • Parameters

    • name: string
    • constructor: Function

    Returns IServiceProvider

  • Parameters

    • name: string
    • inlineAnnotatedFunction: any[]

    Returns IServiceProvider

value

  • Parameters

    • name: string
    • value: any

    Returns IServiceProvider

Generated using TypeDoc