RendererFactory2
Creates and initializes a custom renderer that implements the Renderer2 base class.
API
abstract class RendererFactory2 {
abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;
abstract optional begin(): void;
abstract optional end(): void;
abstract optional whenRenderingDone(): Promise<any>;
}
createRenderer
Renderer2Creates and initializes a custom renderer for a host DOM element.
@paramhostElement
anyThe element to render.
begin
voidA callback invoked when rendering has begun.
@returns
void
end
voidA callback invoked when rendering has completed.
@returns
void
whenRenderingDone
Promise<any>Use with animations test-only mode. Notifies the test when rendering has completed.
@returns
Promise<any>The asynchronous result of the developer-defined function.
Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/core/RendererFactory2