Package org.angular.ts.ng
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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceTypeScript callback contract for this method. -
Method Summary
Modifier and TypeMethodDescriptionPublic RouterModule.animation member exposed by the AngularTS namespace contract.<T> NgModuleappComponent(String name, AppComponentOptions<T> options) Register an options-backed application host custom element.Public RouterModule.component member exposed by the AngularTS namespace contract.Declare built-in AngularTS service configuration during the config phase.Public RouterModule.constant member exposed by the AngularTS namespace contract.controller(String name, Object ctlFn) The $controller service is used by Angular to create new controllers.Public RouterModule.decorator member exposed by the AngularTS namespace contract.Public RouterModule.directive member exposed by the AngularTS namespace contract.Public RouterModule.factory member exposed by the AngularTS namespace contract.Public RouterModule.filter member exposed by the AngularTS namespace contract.getName()Public RouterModule.name member exposed by the AngularTS namespace contract.lazyState(Object prefix, RouterModule.LazyStateLoader loader) Register a lazy state namespace while preserving this module route map.Register a named reactive state machine as an injectable service.Register a named reactive model as an injectable app-owned service.Public RouterModule.provider member exposed by the AngularTS namespace contract.Register a REST resource as an injectable service.Register a router tree while preserving this module's route map.Public RouterModule.run member exposed by the AngularTS namespace contract.Public RouterModule.service member exposed by the AngularTS namespace contract.serviceWorker(Object scriptUrl, ServiceWorkerConfig config) Configure the singleton `$serviceWorker` for this application.voidPublic RouterModule.name member exposed by the AngularTS namespace contract.Register a pre-configured SSE connection as an injectable service.Register a persistent object store as an injectable service.Public RouterModule.value member exposed by the AngularTS namespace contract.Register a named WebAssembly module as an injectable resource.<T> NgModulewebComponent(String name, ScopeElementConstructor<T> elementClass) Register a user-authored native custom element backed by an AngularTS scope.Register a pre-configured WebSocket connection as an injectable service.webTransport(String name, String url, Object config) Register a pre-configured WebTransport connection as an injectable service.Register a named Web Worker connection as an injectable service.Register a named workflow as an injectable service.workflowSupervisor(String name, Object config) Register a named workflow supervisor as an injectable service.
-
Method Details
-
animation
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
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
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
Declare built-in AngularTS service configuration during the config phase.- Parameters:
config- Built-in config map.- Returns:
- Method result.
-
constant
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
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 namectlFn- Controller constructor fn (optionally decorated with DI annotations in the array notation)- Returns:
- Method result.
-
decorator
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
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
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
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
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
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
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
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
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
Register a router tree while preserving this module's route map.- Parameters:
declaration- Value supplied for the declaration parameter.- Returns:
- Method result.
-
run
Public RouterModule.run member exposed by the AngularTS namespace contract.- Parameters:
block- Value supplied for the block parameter.- Returns:
- Method result.
-
service
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
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
Public RouterModule.name member exposed by the AngularTS namespace contract. -
sse
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
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
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
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
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
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
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
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
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
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.
-