File

core/common/outlet.directive.ts

Description

Directive to set a DOM node, a TemplateRef or any Component to a container or any node.

Example :
<div *c8yOutlet="template"></div>
<div *c8yOutlet="DeviceStatusComponent; properties: { node }"></div>
<div *c8yOutlet="nodes"></div>

Note: When passing a native HTMLElement, be aware that a single element instance can only exist in one place in the DOM. If you need to render the same element in multiple locations, the passed element should have a createCopy function that returns a new instance or a clone of the element.

Metadata

Index

Inputs
Accessors

Constructor

constructor(viewContainer: ViewContainerRef, injector: Injector, renderer: Renderer2, el: ElementRef)
Parameters :
Name Type Optional
viewContainer ViewContainerRef No
injector Injector No
renderer Renderer2 No
el ElementRef No

Inputs

c8yOutlet
Type : TemplateRef | Type | Element

Directive to set a DOM node, a TemplateRef or any Component to a container or any node.

Example :
<div *c8yOutlet="template"></div>
<div *c8yOutlet="DeviceStatusComponent; properties: { node }"></div>
<div *c8yOutlet="nodes"></div>
c8yOutletInjector
Type : Injector

Allows to use a different injector.

c8yOutletProperties
Type : any

Additional properties that should be added to the component instance.

Accessors

c8yOutlet
setc8yOutlet(template: TemplateRef | Type | Element)

Directive to set a DOM node, a TemplateRef or any Component to a container or any node.

Example :
<div *c8yOutlet="template"></div>
<div *c8yOutlet="DeviceStatusComponent; properties: { node }"></div>
<div *c8yOutlet="nodes"></div>
Parameters :
Name Type Optional
template TemplateRef<any> | Type<any> | Element No
Returns : void
c8yOutletProperties
setc8yOutletProperties(value)

Additional properties that should be added to the component instance.

Parameters :
Name Optional
value No
Returns : void
c8yOutletInjector
setc8yOutletInjector(value: Injector)

Allows to use a different injector.

Parameters :
Name Type Optional
value Injector No
Returns : void

results matching ""

    No results matching ""