This is the archived documentation for Angular v6. Please visit angular.io to see documentation for the current version of Angular.

RootRenderer

Injectable service that provides a low-level interface for modifying the UI.

See more...

Deprecated: Use RendererFactory2 instead.

      
      abstract class RootRenderer {
  abstract renderComponent(componentType: RenderComponentType): Renderer
}
    

Description

Use this service to bypass Angular's templating and make custom UI changes that can't be expressed declaratively. For example if you need to set a property or an attribute whose name is not statically known, use setElementProperty or setElementAttribute respectively.

If you are implementing a custom renderer, you must implement this interface.

The default Renderer implementation is DomRenderer. Also available is WebWorkerRenderer.

Methods

abstract renderComponent(componentType: RenderComponentType): Renderer
      
      abstract renderComponent(componentType: RenderComponentType): Renderer
    

Parameters

componentType

Type: RenderComponentType.

Returns

Renderer