Used when exporting Angular modules. Makes sure that a module is only imported once in an application.
import { NgModule, Optional, SkipSelf } from '@angular/core'; export class CoreModule { constructor(@Optional() @SkipSelf() parentModule: CoreModule) { throwIfAlreadyLoaded(parentModule, 'CoreModule'); } }
The module being exported
The property name of the module
Generated using TypeDoc
Used when exporting Angular modules. Makes sure that a module is only imported once in an application.
import { NgModule, Optional, SkipSelf } from '@angular/core'; export class CoreModule { constructor(@Optional() @SkipSelf() parentModule: CoreModule) { throwIfAlreadyLoaded(parentModule, 'CoreModule'); } }