Referencer

Helper class that allows you to set and unset references to components.

Description

The Referencer class allows you to set and unset references to components.

Static methods

setReferences

Sets references to multiple components.

To set references components must implement IReferenceable interface. If they don’t the call to this method has no effect.

public static setReferences(references: IReferenceable, components: any[]): void

  • references: IReferences - the references to be set.
  • component: any[] - a list of components to set the references to.

setReferencesForOne

Sets references to specific component.

To set references components must implement IReferenceable interface. If they don’t the call to this method has no effect.

public static setReferencesForOne(references: IReferences, component: any): void

  • references: IReferences - the references to be set.
  • component: any - the component to set references to.

unsetReferences

Unsets references in multiple components. To unset references components must implement IUnreferenceable interface. If they don’t the call to this method has no effect.

public static unsetReferences(components: any[]): void

  • components: any[] - the list of components, whose references must be cleared.

unsetReferencesForOne

Unsets references in specific component.

To unset references components must implement IUnreferenceable interface. If they don’t the call to this method has no effect.

public static unsetReferencesForOne(component: any): void

  • component: any - the component to unset references.

See also