@netgrif/components-core
Version:
Netgrif Application engine frontend core Angular library
30 lines (29 loc) • 1.32 kB
TypeScript
import { Type } from '@angular/core';
import { ConfigurationService } from '../../configuration/configuration.service';
import { LoggerService } from '../../logger/services/logger.service';
import { Router } from '@angular/router';
import { ViewEntry } from './model/view-entry';
/**
* Holds information about views in the application. Can be used to resolve view component class objects from their names.
*/
export declare abstract class ViewService {
protected _router: Router;
protected _logger: LoggerService;
/**
* @ignore
* Stores a mapping of component names to their classes
*/
private _nameToClass;
/**
* @param componentClasses Class objects of view components that should be dynamically routed
* @param configService application's ConfigurationService
* @param _router the application's Router
* @param _logger application's logging service
*/
protected constructor(componentClasses: Array<Type<any> | ViewEntry>, configService: ConfigurationService, _router: Router, _logger: LoggerService);
/**
* @param componentClassName class name of a view component
* @returns the Class object with the provided name or `null` if such name is not registered
*/
resolveNameToClass(componentClassName: string): Type<any> | undefined;
}