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 the IReferenceable interface. If they don’t, the call to this method has no effect.

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

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

setReferencesForOne

Sets references to specific component.

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

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

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

unsetReferences

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

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

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

unsetReferencesForOne

Unsets references in a specific component.

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

public static unsetReferencesForOne(component: any): void

  • component: any - component to unset references.

See also