UIRouterReact | @uirouter/react
Options
Menu

Class UIRouterReact

The main UIRouter object

This is the main UIRouter object. There should be one instance of this object per running application.

This class has references to all the other UIRouter services.

Hierarchy

  • UIRouter
    • UIRouterReact

Index

Constructors

  • new UIRouterReact(): UIRouterReact
  • Creates a new UIRouter instance

  • Creates a new UIRouter instance

    This can be used to manually bootstrap the router.

    Example:

    import { UIRouterReact } from "ui-router-ng2";
    let routerInstance = new UIRouterReact();
    routerInstance.start();
    

    Returns UIRouterReact


Properties

globals: UIRouterGlobals

Global router state

Global router state

locationConfig: LocationConfig
locationService: LocationServices
started: boolean = false
stateRegistry: StateRegistry

Provides a registry for states, and related registration services

Provides a registry for states, and related registration services

stateService: StateService

Provides services related to states

Provides services related to states

trace: Trace

Provides trace information to the console

Provides trace information to the console

transitionService: TransitionService

Provides services related to Transitions

Provides services related to Transitions

urlMatcherFactory: UrlMatcherFactory

Deprecated for public use. Use urlService instead.

Deprecated for public use. Use urlService instead.

deprecated

Use urlService instead

urlRouter: UrlRouter

Deprecated for public use. Use urlService instead.

Deprecated for public use. Use urlService instead.

deprecated

Use urlService instead

urlService: UrlService

Provides services related to the URL

Provides services related to the URL

viewService: ViewService

Provides services related to ui-view synchronization

Provides services related to ui-view synchronization

Methods

  • disposable(disposable: Disposable): void
  • Registers an object to be notified when the router is disposed

  • Registers an object to be notified when the router is disposed

    Parameters

    • disposable Disposable

    Returns void


  • dispose(disposable?: any): void
  • Disposes this router instance

  • Disposes this router instance

    When called, clears resources retained by the router by calling dispose(this) on all registered disposable objects.

    Or, if a disposable object is provided, calls dispose(this) on that object only.

    Parameters

    • disposable: Optional  any
      :

      (optional) the disposable to dispose

    Returns void


  • getPlugin(pluginName: string): UIRouterPlugin
  • Returns registered plugins

  • getPlugin(): UIRouterPlugin[]
  • Returns registered plugins

    Returns the registered plugin of the given pluginName. If no pluginName is given, returns all registered plugins

    Parameters

    • pluginName string
      :

      (optional) the name of the plugin to get

    Returns UIRouterPlugin

    :

    the named plugin (undefined if not found), or all plugins (if pluginName is omitted)


  • Returns UIRouterPlugin[]


  • plugin<T>(plugin: object, options?: any): T
  • Add plugin (as ES6 class)

  • plugin<T>(plugin: function, options?: any): T
  • Add plugin (as javascript constructor function)

  • plugin<T>(plugin: PluginFactory<T>, options?: any): T
  • Add plugin (as javascript factory function)

  • Add plugin (as ES6 class)

    Type parameters

    • T: UIRouterPlugin

    Parameters

    • plugin object
      • constructor: function
        • new __type(router: UIRouter, options?: any): T
        • Parameters

          • router UIRouter
          • options: Optional  any

          Returns T


    • options: Optional  any

    Returns T


  • Add plugin (as javascript constructor function)

    Type parameters

    • T: UIRouterPlugin

    Parameters

    • plugin function
        • (router: UIRouter, options?: any): void
        • Parameters

          • router UIRouter
          • options: Optional  any

          Returns void

    • options: Optional  any

    Returns T


  • Add plugin (as javascript factory function)

    Type parameters

    • T: UIRouterPlugin

    Parameters

    Returns T


  • start(): void
  • Starts the router

  • Starts the router

    Calling this method enables listening to the URL for changes. It also performs the initial state synchronization from the URL.

    Returns void


Generated using TypeDoc