kit-anchor

API

[class] KitAnchorDirective

@Directive

Selector:'[kitAnchor]'
Export as:'anchor'

Returns a reference to elementRef of any element.

If you define a template reference on the element that Angular views as a host element of the component, you will get a reference to the component instance. kitAnchor resolves the problem.

Usage

<any-component kitAnchor #anchor="anchor"></any-component>
<some-other-component [anchor]="anchor"></some-other-component>

Members

SignatureDescription
get elementRef(): ElementRef

Get reference to anchored element.

get nativeEl()

Get anchored html-element.

[class] KitAnchorModule

@NgModule

Exports:[ KitAnchorDirective, ]

[interface] KitAnchor

Members

SignatureDescription
elementRef(): ElementRef
nativeEl(): HTMLElement