ViewService | UI-Router
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ViewService

The View service

Hierarchy

  • ViewService

Index

Constructors

Properties

_rootContext: any
_viewConfigFactories: object

Type declaration

uiViews: ActiveUIView[]
viewConfigs: ViewConfig[]

Methods

  • activateViewConfig(viewConfig: ViewConfig): void
  • active(): Array<any>
  • Returns the list of views on the page containing loaded content.

  • Returns the list of views on the page containing loaded content.

    Returns Array<any>

    :

    Returns an array of fully-qualified view names.


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

  • Returns the list of views currently available on the page, by fully-qualified name.

    Returns Array<any>

    :

    Returns an array of fully-qualified view names.


  • deactivateViewConfig(viewConfig: ViewConfig): void
  • De-registers a ViewConfig.

  • De-registers a ViewConfig.

    Parameters

    • viewConfig: ViewConfig
      :

      The ViewConfig view to deregister.

    Returns void


  • registerUiView(uiView: ActiveUIView): (Anonymous function)
  • Allows a ui-view element to register its canonical name with a callback that allows it to be updated with a template, controller, and local variables.

  • Allows a ui-view element to register its canonical name with a callback that allows it to be updated with a template, controller, and local variables.

    Parameters

    • uiView: ActiveUIView

    Returns (Anonymous function)

    :

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


  • rootContext(context: any): any
  • sync(): void
  • normalizeUiViewTarget(context: ViewContext, rawViewName?: string): object
  • Normalizes a view's name from a state.views configuration block.

  • Normalizes a view's name from a state.views configuration block.

    Parameters

    • context: ViewContext
      :

      the context object (state declaration) that the view belongs to

    • rawViewName Default value: string = ""
      :

      the name of the view, as declared in the StateDeclaration.views

    Returns object

    :

    the normalized uiViewName and uiViewContextAnchor that the view targets

    • uiViewContextAnchor: string
    • uiViewName: string

Generated using TypeDoc