Interface RouterModule<TRouteMap>


@JsType(isNative=true, name="ng.RouterModule", namespace="<global>") public interface RouterModule<TRouteMap>
Public AngularTS RouterModule contract exposed through the global ng namespace for Closure-annotated applications.
  • Method Details

    • animation

      NgModule animation(String name, Object animationFactory)
      Public RouterModule.animation member exposed by the AngularTS namespace contract.
      Parameters:
      name - Value supplied for the name parameter.
      animationFactory - Value supplied for the animationFactory parameter.
      Returns:
      Method result.
    • appComponent

      <T> NgModule appComponent(String name, AppComponentOptions<T> options)
      Register an options-backed application host custom element. The definition is installed when the module runs. The host element is a native custom element backed by an AngularTS child scope.
      Parameters:
      name - Custom element tag name.
      options - App component options.
      Returns:
      Method result.
    • component

      NgModule component(String name, Object options)
      Public RouterModule.component member exposed by the AngularTS namespace contract.
      Parameters:
      name - Value supplied for the name parameter.
      options - Value supplied for the options parameter.
      Returns:
      Method result.
    • config

      NgModule config(Object config)
      Declare built-in AngularTS service configuration during the config phase.
      Parameters:
      config - Built-in config map.
      Returns:
      Method result.
    • constant

      NgModule constant(String name, Object object)
      Public RouterModule.constant member exposed by the AngularTS namespace contract.
      Parameters:
      name - Value supplied for the name parameter.
      object - Value supplied for the object parameter.
      Returns:
      Method result.
    • controller

      NgModule controller(String name, Object ctlFn)
      The $controller service is used by Angular to create new controllers. Named controllers are stored in the owning runtime's controller registry.
      Parameters:
      name - Controller name
      ctlFn - Controller constructor fn (optionally decorated with DI annotations in the array notation)
      Returns:
      Method result.
    • decorator

      NgModule decorator(String name, Object decorFn)
      Public RouterModule.decorator member exposed by the AngularTS namespace contract.
      Parameters:
      name - Value supplied for the name parameter.
      decorFn - Value supplied for the decorFn parameter.
      Returns:
      Method result.
    • directive

      NgModule directive(String name, Object directiveFactory)
      Public RouterModule.directive member exposed by the AngularTS namespace contract.
      Parameters:
      name - Value supplied for the name parameter.
      directiveFactory - Value supplied for the directiveFactory parameter.
      Returns:
      Method result.
    • factory

      NgModule factory(String name, Object providerFunction)
      Public RouterModule.factory member exposed by the AngularTS namespace contract.
      Parameters:
      name - Value supplied for the name parameter.
      providerFunction - Value supplied for the providerFunction parameter.
      Returns:
      Method result.
    • filter

      NgModule filter(String name, Object filterFn)
      Public RouterModule.filter member exposed by the AngularTS namespace contract.
      Parameters:
      name - Value supplied for the name parameter.
      filterFn - Value supplied for the filterFn parameter.
      Returns:
      Method result.
    • getName

      @JsProperty String getName()
      Public RouterModule.name member exposed by the AngularTS namespace contract.
    • lazyState

      Register a lazy state namespace while preserving this module route map.
      Parameters:
      prefix - Value supplied for the prefix parameter.
      loader - Value supplied for the loader parameter.
      Returns:
      Method result.
    • machine

      NgModule machine(String name, Object config)
      Register a named reactive state machine as an injectable service. The machine is created by `$machine` when the named service is requested. The returned instance is not tied to any one scope lifetime; it registers with AngularTS scope proxies when assigned to a controller or scope.
      Parameters:
      name - Injectable name.
      config - Machine configuration or a resolvable config factory.
      Returns:
      Method result.
    • model

      NgModule model(String name, Object initial)
      Register a named reactive model as an injectable app-owned service. The model is created lazily by the owning `AppContext` when the service is first injected. Models are shared across every root scope managed by the same `AppContext`; they are not children of `$rootScope`. Assign an injected model to a controller or scope property to bind it in a template. DOM interpolation, `ng-bind`, directive expressions, nested object reads, and array length reads update when the app model changes. Mutating the model proxy schedules every affected observer. The injected `Model<T>` value is proxy-backed. It exposes scope-proxy methods such as `watch`, `batch`, `merge`, `on`, `emit`, `broadcast`, and `destroy`, plus `snapshot`, `restore`, and `sync` for model lifecycle and synchronization. Prefer the factory form for nontrivial initial state: ```ts app.model("user", () => ({ name: "John", authenticated: false })); ```
      Parameters:
      name - Injectable model name.
      initial - Plain object state or an injectable factory that returns plain object state.
      Returns:
      Method result.
    • provider

      NgModule provider(String name, Object providerType)
      Public RouterModule.provider member exposed by the AngularTS namespace contract.
      Parameters:
      name - Value supplied for the name parameter.
      providerType - Value supplied for the providerType parameter.
      Returns:
      Method result.
    • rest

      NgModule rest(String name, String url, Object entityClass, Object options)
      Register a REST resource as an injectable service. The resource factory is delegated to the injected `$rest` service, keeping REST support configurable by custom runtimes.
      Parameters:
      name - Service name.
      url - Base URL or URI template.
      entityClass - Optional constructor for mapping JSON.
      options - Optional RestService options, optionally produced by DI.
      Returns:
      Method result.
    • router

      RouterModule<TRouteMap> router(Object declaration)
      Register a router tree while preserving this module's route map.
      Parameters:
      declaration - Value supplied for the declaration parameter.
      Returns:
      Method result.
    • run

      NgModule run(Object block)
      Public RouterModule.run member exposed by the AngularTS namespace contract.
      Parameters:
      block - Value supplied for the block parameter.
      Returns:
      Method result.
    • service

      NgModule service(String name, Object serviceFunction)
      Public RouterModule.service member exposed by the AngularTS namespace contract.
      Parameters:
      name - Value supplied for the name parameter.
      serviceFunction - Value supplied for the serviceFunction parameter.
      Returns:
      Method result.
    • serviceWorker

      NgModule serviceWorker(Object scriptUrl, ServiceWorkerConfig config)
      Configure the singleton `$serviceWorker` for this application.
      Parameters:
      scriptUrl - Value supplied for the scriptUrl parameter.
      config - Value supplied for the config parameter.
      Returns:
      Method result.
    • setName

      @JsProperty void setName(String name)
      Public RouterModule.name member exposed by the AngularTS namespace contract.
    • sse

      NgModule sse(String name, String url, Object config)
      Register a pre-configured SSE connection as an injectable service. The connection is created by `$sse` when the named service is requested.
      Parameters:
      name - Injectable name.
      url - SSE endpoint.
      config - SSE connection options, optionally produced by DI.
      Returns:
      Method result.
    • store

      NgModule store(String name, Object ctor, String type, Object backendOrConfig)
      Register a persistent object store as an injectable service. Store construction is delegated to the internal provider registry, which creates the service through the injector and persists it through the selected backend.
      Parameters:
      name - Service name.
      ctor - Constructor, factory, or object to persist.
      type - Storage backend type.
      backendOrConfig - Custom backend or persistence options.
      Returns:
      Method result.
    • value

      NgModule value(String name, Object object)
      Public RouterModule.value member exposed by the AngularTS namespace contract.
      Parameters:
      name - Value supplied for the name parameter.
      object - Allows undefined
      Returns:
      Method result.
    • wasm

      NgModule wasm(String name, Object config)
      Register a named WebAssembly module as an injectable resource. The actual loading is delegated to the `$wasm` service, so custom runtimes can decide whether WebAssembly support is included.
      Parameters:
      name - Injectable name used to access the resource.
      config - Module source and imports, optionally produced by DI.
      Returns:
      Method result.
    • webComponent

      <T> NgModule webComponent(String name, ScopeElementConstructor<T> elementClass)
      Register a user-authored native custom element backed by an AngularTS scope. The element class must extend `ScopeElement`. Its static template, shadow, scope, inputs, and isolate properties configure the AngularTS wiring.
      Parameters:
      name - Custom element tag name.
      elementClass - Custom element class.
      Returns:
      Method result.
    • webTransport

      NgModule webTransport(String name, String url, Object config)
      Register a pre-configured WebTransport connection as an injectable service. The connection is created by `$webTransport` when the named service is requested.
      Parameters:
      name - Injectable name.
      url - WebTransport endpoint.
      config - WebTransport connection options, optionally produced by DI.
      Returns:
      Method result.
    • websocket

      NgModule websocket(String name, String url, Object config)
      Register a pre-configured WebSocket connection as an injectable service. The connection is created by `$websocket` when the named service is requested.
      Parameters:
      name - Injectable name.
      url - WebSocket endpoint.
      config - WebSocket connection options, optionally produced by DI.
      Returns:
      Method result.
    • worker

      NgModule worker(String name, Object scriptPath, Object config)
      Register a named Web Worker connection as an injectable service. The actual connection is delegated to the `$worker` provider, so worker support remains provider-driven instead of directive-driven.
      Parameters:
      name - Injectable name.
      scriptPath - Worker script URL, optionally produced by DI.
      config - Worker connection options, optionally produced by DI.
      Returns:
      Method result.
    • workflow

      NgModule workflow(String name, Object config)
      Register a named workflow as an injectable service. The workflow is created by `$workflow` when the named service is requested. Workflow behavior remains local to its `WorkflowConfig`; the provider does not apply global workflow defaults.
      Parameters:
      name - Injectable name.
      config - Workflow configuration or a resolvable config factory.
      Returns:
      Method result.
    • workflowSupervisor

      NgModule workflowSupervisor(String name, Object config)
      Register a named workflow supervisor as an injectable service. The supervisor is created when the named service is requested. It composes existing workflow configs or workflow instances and keeps persistence and recovery policy local to the supervisor config.
      Parameters:
      name - Injectable name.
      config - Supervisor configuration or a resolvable config factory.
      Returns:
      Method result.