projects/maplander/core/src/lib/injector/injector.module.ts
Static forRoot |
forRoot()
|
Returns :
ModuleWithProviders
|
/*
* Copyright (C) MapLander S de R.L de C.V - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
*/
import {Injector, ModuleWithProviders, NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
export let InjectorInstance: Injector;
@NgModule({
declarations: [],
imports: [
CommonModule
]
})
export class InjectorModule {
constructor(
private injector: Injector
) {
InjectorInstance = this.injector;
}
static forRoot(): ModuleWithProviders {
return {
ngModule: InjectorModule
};
}
}