Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "angular-utils"

Index

Functions

throwIfAlreadyLoaded

  • throwIfAlreadyLoaded(parentModule: any, moduleName: string): void
  • Used when exporting Angular modules. Makes sure that a module is only imported once in an application.

    example

    import { NgModule, Optional, SkipSelf } from '@angular/core'; export class CoreModule { constructor(@Optional() @SkipSelf() parentModule: CoreModule) { throwIfAlreadyLoaded(parentModule, 'CoreModule'); } }

    Parameters

    • parentModule: any

      The module being exported

    • moduleName: string

      The property name of the module

    Returns void

Generated using TypeDoc