AngularTS
    Preparing search index...

    Interface InjectorService

    Injector for factories and services

    interface InjectorService {
        loadNewModules: (
            mods: (string | Callable | AnnotatedFactory<Callable>)[],
        ) => void;
        strictDi: boolean;
        get(serviceName: string): unknown;
        has(name: string): boolean;
        instantiate(
            type: InjectableFn,
            locals?: object,
            serviceName?: string,
        ): unknown;
        invoke(
            fn: string | InjectableFn,
            self?: unknown,
            locals?: string | object,
            serviceName?: string,
        ): unknown;
    }

    Hierarchy

    • AbstractInjector
      • InjectorService
    Index

    Properties

    loadNewModules: (
        mods: (string | Callable | AnnotatedFactory<Callable>)[],
    ) => void = defaultLoadNewModules
    strictDi: boolean

    Methods

    • Get a service by name.

      Parameters

      • serviceName: string

      Returns unknown

    • Parameters

      • name: string

      Returns boolean

    • Instantiate a type constructor with optional locals.

      Parameters

      • type: InjectableFn
      • Optionallocals: object
      • OptionalserviceName: string

      Returns unknown

    • Invoke a function with optional context and locals.

      Parameters

      • fn: string | InjectableFn
      • Optionalself: unknown
      • Optionallocals: string | object
      • OptionalserviceName: string

      Returns unknown