@skyux/core
Version:
This library was generated with [Nx](https://nx.dev).
34 lines (33 loc) • 1.55 kB
TypeScript
import { ApplicationRef, ComponentRef, RendererFactory2, Type } from '@angular/core';
import { SkyAppWindowRef } from '../window/window-ref';
import { SkyDynamicComponentOptions } from './dynamic-component-options';
import * as i0 from "@angular/core";
/**
* Angular service for creating and rendering a dynamic component.
* @internal
*/
export declare class SkyDynamicComponentService {
#private;
constructor(applicationRef: ApplicationRef, windowRef: SkyAppWindowRef, rendererFactory: RendererFactory2);
/**
* Creates an instance of the specified component and adds it to the specified location
* on the page.
*/
createComponent<T>(componentType: Type<T>, options?: SkyDynamicComponentOptions): ComponentRef<T>;
/**
* Removes a component ref from the page
* @param componentRef Component ref for the component being removed
*/
removeComponent<T>(componentRef: ComponentRef<T> | undefined): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDynamicComponentService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<SkyDynamicComponentService>;
}
/**
* Angular service for creating and rendering a dynamic component.
* @internal
* @deprecated Use `SkyDynamicComponentService` to create a standalone component instead.
*/
export declare class SkyDynamicComponentLegacyService extends SkyDynamicComponentService {
static ɵfac: i0.ɵɵFactoryDeclaration<SkyDynamicComponentLegacyService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<SkyDynamicComponentLegacyService>;
}