Home Manual Reference Source Repository
import {ViewHookExecutor} from 'ug-layout/view/hooks/ViewHookExecutor'
public class | source

ViewHookExecutor

Executes view hooks on a component instance.

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

execute(instance: T, method: string, arg: *): *

Invokes the view hook on the instance with the given argument.

public

linkObservers(viewContainer: ViewContainer<T>, target: Object)

Links a resolved view container to any hook observables.

public

registerInterceptor(instance: *, hook: string, fn: Function)

Registers an interceptor for a hook on a given instance.

Public Constructors

public constructor() source

Public Methods

public execute(instance: T, method: string, arg: *): * source

Invokes the view hook on the instance with the given argument. This will also invoke any interceptors for the hook as well after the hook on the component has been invoked.

Params:

NameTypeAttributeDescription
instance T
method string
arg *
  • optional

Return:

*

public linkObservers(viewContainer: ViewContainer<T>, target: Object) source

Links a resolved view container to any hook observables. Metadata is read from the given target.

Params:

NameTypeAttributeDescription
viewContainer ViewContainer<T>
target Object

public registerInterceptor(instance: *, hook: string, fn: Function) source

Registers an interceptor for a hook on a given instance.

Params:

NameTypeAttributeDescription
instance *
hook string
fn Function