getModule
export declare function getModule(modules: Array<IModule>, name?: string): IModule;
You can use to navigate to initialized module if you need it.
This is used internally by framework but if you need it you can use it to.
import {httpServer, Module} from "typeix";
@Module({
name: 'modulec'
})
class ModuleC {
}
@Module({
name: 'moduleb',
imports: [ModuleC]
})
class ModuleB {
}
@Module({
imports: [ModuleB]
})
class Application {
}
let modules = httpServer(Application, 9000): Array<IModule>;
let moduleB: IModule = getModule(modules, 'moduleb');
// IModule interface
export interface IModule {
injector: Injector;
provider: IProvider;
name: string;
}