Class AppModule<T, C>

Type Parameters

Hierarchy

Constructors

  • Type Parameters

    Parameters

    • options: T
    • name: string = ''
    • setups: ((module: AppModule<any, any>, config: any) => void)[] = []
    • id: number = ...

    Returns AppModule<T, C>

Properties

controllers: ClassType<any>[] = []
id: number = ...
imports: AppModule<any, any>[] = []
listeners: ListenerType[] = []
middlewares: MiddlewareFactory[] = []
name: string = ''
options: T
setupConfigs: ((module: AppModule<any, any>, config: any) => void)[] = []
setups: ((module: AppModule<any, any>, config: any) => void)[] = []
workflows: WorkflowDefinition<any>[] = []

Methods

  • After process and when all modules have been processed by the service container. This is also after processController and processProvider have been called and the full final module tree is known. Adding now new providers or modules doesn't have any effect.

    Last chance to set up the injector context, via this.setupProvider().

    Returns void

  • When all configuration loaders have been loaded, this method is called. It allows to further manipulate the module state depending on the final config.

    Returns void

  • A hook point to the service container. Allows to react on a registered controller in some module.

    Parameters

    • module: AppModule<any, any>
    • controller: ClassType<any>

    Returns void

  • A hook point to the service container. Allows to react on a registered provider in some module.

    Parameters

    • module: AppModule<any, any>
    • token: any
    • provider: ProviderWithScope<any>

    Returns void

  • Allows to change the module after the configuration has been loaded, right before the application bootstraps.

    Parameters

    • callback: ((module: AppModule<T, any>, config: C) => void)
        • (module: AppModule<T, any>, config: C): void
        • Parameters

          Returns void

    Returns AppModule<T, C>

  • Allows to change the module config before setup and bootstrap is called. This is the last step right before the config is validated.

    Parameters

    • callback: ((module: AppModule<T, any>, config: C) => void)
        • (module: AppModule<T, any>, config: C): void
        • Parameters

          Returns void

    Returns AppModule<T, C>

Generated using TypeDoc