ViewService | @uirouter/react
Options
All
  • Public
  • Public/Protected
  • All
Menu

The View service

This service pairs existing ui-view components (which live in the DOM) with view configs (from the state declaration objects: StateDeclaration.views).

Hierarchy

  • ViewService

Index

Methods

activateViewConfig

  • activateViewConfig(viewConfig: ViewConfig): void

active

  • active(): any[]
  • Returns the list of views on the page containing loaded content.

    Returns any[]

    Returns an array of fully-qualified view names.

available

  • available(): any[]
  • Returns the list of views currently available on the page, by fully-qualified name.

    Returns any[]

    Returns an array of fully-qualified view names.

createViewConfig

deactivateViewConfig

  • deactivateViewConfig(viewConfig: ViewConfig): void
  • Deactivates a ViewConfig.

    This function deactivates a ViewConfig. After calling sync, it will un-pair from any ui-view with which it is currently paired.

    Parameters

    • viewConfig: ViewConfig

      The ViewConfig view to deregister.

    Returns void

registerUIView

  • registerUIView(uiView: ActiveUIView): (Anonymous function)
  • Registers a ui-view component

    When a ui-view component is created, it uses this method to register itself. After registration the sync method is used to ensure all ui-view are configured with the proper ViewConfig.

    Note: the ui-view component uses the ViewConfig to determine what view should be loaded inside the ui-view, and what the view's state context is.

    Note: There is no corresponding deregisterUIView. A ui-view should hang on to the return value of registerUIView and invoke it to deregister itself.

    Parameters

    Returns (Anonymous function)

    a de-registration function used when the view is destroyed.

sync

  • sync(): void

Static normalizeUIViewTarget

  • normalizeUIViewTarget(context: ViewContext, rawViewName?: string): { uiViewContextAnchor: string; uiViewName: string }

Generated using TypeDoc