@angular-wave/angular.ts 0.0.29 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/angular-ts.esm.js +1 -1
  2. package/dist/angular-ts.umd.js +1 -1
  3. package/index.html +5 -6
  4. package/package.json +1 -1
  5. package/src/core/controller.js +3 -0
  6. package/src/directive/controller.js +0 -56
  7. package/src/directive/controller.md +46 -0
  8. package/src/router/common/trace.js +1 -1
  9. package/src/router/directives/state-directives.js +1 -1
  10. package/src/router/hooks/update-globals.js +1 -1
  11. package/src/router/injectables.js +8 -8
  12. package/src/router/resolve/resolve-context.js +1 -1
  13. package/src/router/router.js +1 -71
  14. package/src/router/services.js +2 -36
  15. package/src/router/state/state-object.js +1 -1
  16. package/src/router/state/state-registry.js +1 -1
  17. package/src/router/state/target-state.js +1 -1
  18. package/src/router/state/views.js +1 -1
  19. package/src/router/url/url-config.js +0 -2
  20. package/src/router/url/url-matcher-factory.js +0 -1
  21. package/src/router/url/url-matcher.js +0 -8
  22. package/src/router/url/url-service.js +6 -6
  23. package/src/router/view/view.js +2 -0
  24. package/src/shared/common.js +1 -1
  25. package/types/router/core/common/coreservices.d.ts +2 -2
  26. package/types/router/core/common/trace.d.ts +7 -7
  27. package/types/router/core/globals.d.ts +2 -1
  28. package/types/router/core/interface.d.ts +3 -10
  29. package/types/router/core/params/interface.d.ts +3 -3
  30. package/types/router/core/resolve/resolveContext.d.ts +4 -4
  31. package/types/router/core/router.d.ts +5 -51
  32. package/types/router/core/state/interface.d.ts +6 -6
  33. package/types/router/core/state/stateObject.d.ts +1 -1
  34. package/types/router/core/state/stateQueueManager.d.ts +2 -2
  35. package/types/router/core/state/stateRegistry.d.ts +4 -4
  36. package/types/router/core/state/stateService.d.ts +9 -9
  37. package/types/router/core/state/targetState.d.ts +1 -1
  38. package/types/router/core/transition/interface.d.ts +1 -1
  39. package/types/router/core/transition/transition.d.ts +12 -12
  40. package/types/router/core/transition/transitionService.d.ts +5 -5
  41. package/types/router/core/url/interface.d.ts +3 -3
  42. package/types/router/core/url/urlConfig.d.ts +3 -3
  43. package/types/router/core/url/urlMatcherFactory.d.ts +3 -3
  44. package/types/router/core/url/urlRouter.d.ts +2 -2
  45. package/types/router/core/url/urlRule.d.ts +6 -6
  46. package/types/router/core/url/urlRules.d.ts +6 -6
  47. package/types/router/core/url/urlService.d.ts +8 -8
  48. package/types/router/core/view/interface.d.ts +1 -1
  49. package/types/router/core/view/view.d.ts +15 -15
  50. package/types/router/directives/viewDirective.d.ts +4 -4
  51. package/types/router/interface.d.ts +4 -4
  52. package/types/router/locationServices.d.ts +3 -3
  53. package/types/router/services.d.ts +1 -1
  54. package/types/router/stateProvider.d.ts +2 -2
  55. package/types/router/viewScroll.d.ts +1 -1
@@ -1,9 +1,9 @@
1
- import { UIRouter } from "./router";
1
+ import { Router } from "./router";
2
2
  /**
3
3
  * An interface for getting values from dependency injection.
4
4
  *
5
5
  * This is primarily used to get resolve values for a given token.
6
- * An instance of the `UIInjector` can be retrieved from the current transition using [[Transition.injector]].
6
+ * An instance of the `NGInjector` can be retrieved from the current transition using [[Transition.injector]].
7
7
  *
8
8
  * ---
9
9
  *
@@ -13,7 +13,7 @@ import { UIRouter } from "./router";
13
13
  * In Angular 2, the native injector might be the root Injector,
14
14
  * or it might be a lazy loaded `NgModule` injector scoped to a lazy load state tree.
15
15
  */
16
- export interface UIInjector {
16
+ export interface NGInjector {
17
17
  /**
18
18
  * Gets a value from the injector.
19
19
  *
@@ -89,10 +89,3 @@ export interface UIInjector {
89
89
  getNative(token: any): any;
90
90
  getNative<T>(token: any): T;
91
91
  }
92
- export interface UIRouterPlugin {
93
- name: string;
94
- }
95
- export declare abstract class UIRouterPluginBase implements UIRouterPlugin {
96
- abstract name: string;
97
- dispose(router: UIRouter): void;
98
- }
@@ -53,7 +53,7 @@ export interface ParamDeclaration {
53
53
  * Specifies the default value for this parameter.
54
54
  * This implicitly sets this parameter as optional.
55
55
  *
56
- * When UI-Router routes to a state and no value is specified for this parameter in the URL or transition,
56
+ * When Router routes to a state and no value is specified for this parameter in the URL or transition,
57
57
  * the default value will be used instead.
58
58
  * If value is a function, it will be injected and invoked, and the return value used.
59
59
  *
@@ -245,7 +245,7 @@ export interface ParamDeclaration {
245
245
  * Normally, if a parameter value changes, the state which declared that the parameter will be reloaded (entered/exited).
246
246
  * When a parameter is `dynamic`, a transition still occurs, but it does not cause the state to exit/enter.
247
247
  *
248
- * This can be useful to build UI where the component updates itself when the param values change.
248
+ * This can be useful to build NG where the component updates itself when the param values change.
249
249
  * A common scenario where this is useful is searching/paging/sorting.
250
250
  *
251
251
  * ---
@@ -373,7 +373,7 @@ export interface Replace {
373
373
  * - some internal string representation
374
374
  *
375
375
  * Typed parameter definitions control how parameter values are encoded (to the URL) and decoded (from the URL).
376
- * UI-Router always provides the decoded parameter values to the user (from methods such as [[Transition.params]])).
376
+ * Router always provides the decoded parameter values to the user (from methods such as [[Transition.params]])).
377
377
  *
378
378
  * For example, if a state has a url of `/foo/{fooId:int}` (the `fooId` parameter is of the `int` ParamType)
379
379
  * and if the browser is at `/foo/123`, then the 123 is parsed as an integer:
@@ -3,12 +3,12 @@ import { PathNode } from "../path/pathNode";
3
3
  import { Resolvable } from "./resolvable";
4
4
  import { StateObject } from "../state/stateObject";
5
5
  import { Transition } from "../transition/transition";
6
- import { UIInjector } from "../interface";
6
+ import { NGInjector } from "../interface";
7
7
  export declare const NATIVE_INJECTOR_TOKEN: string;
8
8
  /**
9
9
  * Encapsulates Dependency Injection for a path of nodes
10
10
  *
11
- * UI-Router states are organized as a tree.
11
+ * Router states are organized as a tree.
12
12
  * A nested state has a path of ancestors to the root of the tree.
13
13
  * When a state is being activated, each element in the path is wrapped as a [[PathNode]].
14
14
  * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated.
@@ -17,7 +17,7 @@ export declare const NATIVE_INJECTOR_TOKEN: string;
17
17
  */
18
18
  export declare class ResolveContext {
19
19
  private _path;
20
- _injector: UIInjector;
20
+ _injector: NGInjector;
21
21
  constructor(_path: PathNode[]);
22
22
  /** Gets all the tokens found in the resolve context, de-duplicated */
23
23
  getTokens(): any[];
@@ -86,7 +86,7 @@ export declare class ResolveContext {
86
86
  value: any;
87
87
  }[]
88
88
  >;
89
- injector(): UIInjector;
89
+ injector(): NGInjector;
90
90
  findNode(resolvable: Resolvable): PathNode;
91
91
  /**
92
92
  * Gets the async dependencies of a Resolvable
@@ -4,17 +4,16 @@ import { TransitionService } from "./transition/transitionService";
4
4
  import { ViewService } from "./view/view";
5
5
  import { StateRegistry } from "./state/stateRegistry";
6
6
  import { StateService } from "./state/stateService";
7
- import { UIRouterGlobals } from "./globals";
8
- import { UIRouterPlugin } from "./interface";
7
+ import { RouterGlobals } from "./globals";
9
8
  import { UrlService } from "./url/urlService";
10
9
  import { LocationServices, LocationConfig } from "./common/coreservices";
11
10
  import { Trace } from "./common/trace";
12
11
  /**
13
- * An instance of UI-Router.
12
+ * An instance of Router.
14
13
  *
15
14
  * This object contains references to service APIs which define your application's routing behavior.
16
15
  */
17
- export declare class UIRouter {
16
+ export declare class Router {
18
17
  locationService: LocationServices;
19
18
  locationConfig: LocationConfig;
20
19
  /** @internal */ $id: number;
@@ -25,7 +24,7 @@ export declare class UIRouter {
25
24
  /** Provides services related to ui-view synchronization */
26
25
  viewService: ViewService;
27
26
  /** An object that contains global router state, such as the current state and params */
28
- globals: UIRouterGlobals;
27
+ globals: RouterGlobals;
29
28
  /** A service that exposes global Transition Hooks */
30
29
  transitionService: TransitionService;
31
30
  /**
@@ -44,23 +43,8 @@ export declare class UIRouter {
44
43
  stateRegistry: StateRegistry;
45
44
  /** Provides services related to states */
46
45
  stateService: StateService;
47
- /** @internal plugin instances are registered here */
48
- private _plugins;
49
-
50
46
  /**
51
- * Disposes this router instance
52
- *
53
- * When called, clears resources retained by the router by calling `dispose(this)` on all
54
- * registered [[disposable]] objects.
55
- *
56
- * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.
57
- *
58
- * @internal
59
- * @param disposable (optional) the disposable to dispose
60
- */
61
- dispose(disposable?: any): void;
62
- /**
63
- * Creates a new `UIRouter` object
47
+ * Creates a new `Router` object
64
48
  *
65
49
  * @param locationService a [[LocationServices]] implementation
66
50
  * @param locationConfig a [[LocationConfig]] implementation
@@ -70,34 +54,4 @@ export declare class UIRouter {
70
54
  locationService?: LocationServices,
71
55
  locationConfig?: LocationConfig,
72
56
  );
73
- /** Add plugin (as ES6 class) */
74
- plugin<T extends UIRouterPlugin>(
75
- plugin: {
76
- new (router: UIRouter, options?: any): T;
77
- },
78
- options?: any,
79
- ): T;
80
- /** Add plugin (as javascript constructor function) */
81
- plugin<T extends UIRouterPlugin>(
82
- plugin: {
83
- (router: UIRouter, options?: any): void;
84
- },
85
- options?: any,
86
- ): T;
87
- /** Add plugin (as javascript factory function) */
88
- plugin<T extends UIRouterPlugin>(plugin: PluginFactory<T>, options?: any): T;
89
- /**
90
- * Returns a plugin registered with the given `pluginName`.
91
- *
92
- * @param pluginName the name of the plugin to get
93
- * @return the plugin, or undefined
94
- */
95
- getPlugin(pluginName: string): UIRouterPlugin;
96
- /**
97
- * Returns all registered plugins
98
- * @return all registered plugins
99
- */
100
- getPlugin(): UIRouterPlugin[];
101
57
  }
102
- /** @internal */
103
- export declare type PluginFactory<T> = (router: UIRouter, options?: any) => T;
@@ -31,7 +31,7 @@ export declare type ResolveTypes =
31
31
  * Base interface for declaring a view
32
32
  *
33
33
  * This interface defines the basic data that a normalized view declaration will have on it.
34
- * Each implementation of UI-Router (for a specific framework) should define its own extension of this interface.
34
+ * Each implementation of Router (for a specific framework) should define its own extension of this interface.
35
35
  * Add any additional fields that the framework requires to that interface.
36
36
  */
37
37
  export interface _ViewDeclaration {
@@ -86,7 +86,7 @@ export declare type RedirectToResult =
86
86
  /**
87
87
  * The StateDeclaration object is used to define a state or nested state.
88
88
  *
89
- * Note: Each implementation of UI-Router (for a specific framework)
89
+ * Note: Each implementation of Router (for a specific framework)
90
90
  * extends this interface as necessary.
91
91
  *
92
92
  * #### Example:
@@ -203,7 +203,7 @@ export interface StateDeclaration {
203
203
  * - Each key (string) is the name of the dependency.
204
204
  * - Each value (function) is an injectable function which returns the dependency, or a promise for the dependency.
205
205
  *
206
- * This style is based on AngularJS injectable functions, but can be used with any UI-Router implementation.
206
+ * This style is based on AngularJS injectable functions, but can be used with any Router implementation.
207
207
  * If your code will be minified, the function should be ["annotated" in the AngularJS manner](https://docs.angularjs.org/guide/di#dependency-annotation).
208
208
  *
209
209
  * #### AngularJS Example:
@@ -257,7 +257,7 @@ export interface StateDeclaration {
257
257
  *
258
258
  * #### Special injectable tokens
259
259
  *
260
- * - `UIRouter`: The [[UIRouter]] instance which has references to all the UI-Router services.
260
+ * - `Router`: The [[Router]] instance which has references to all the Router services.
261
261
  * - `Transition`: The current [[Transition]] object; information and API about the current transition, such as
262
262
  * "to" and "from" State Parameters and transition options.
263
263
  * - `'$transition$'`: A string alias for the `Transition` injectable
@@ -428,7 +428,7 @@ export interface StateDeclaration {
428
428
  *
429
429
  * Note: `redirectTo` is processed as an `onStart` hook, before `LAZY` resolves.
430
430
  * If your redirect function relies on resolve data, get the [[Transition.injector]] and get a
431
- * promise for the resolve data using [[UIInjector.getAsync]].
431
+ * promise for the resolve data using [[NGInjector.getAsync]].
432
432
  *
433
433
  * #### Example:
434
434
  * ```js
@@ -595,7 +595,7 @@ export interface StateDeclaration {
595
595
  * It matches any state name that starts with the `name` (including child states that are not yet loaded).
596
596
  * - A `url` prefix.
597
597
  * A future state's `url` property acts as a wildcard.
598
- * UI-Router matches all paths that begin with the `url`.
598
+ * Router matches all paths that begin with the `url`.
599
599
  * It effectively appends `.*` to the internal regular expression.
600
600
  * When the prefix matches, the future state will begin loading.
601
601
  * - A `lazyLoad` function.
@@ -12,7 +12,7 @@ import { TargetState } from "./targetState";
12
12
  import { Transition } from "../transition/transition";
13
13
  import { Glob } from "../common/glob";
14
14
  /**
15
- * Internal representation of a UI-Router state.
15
+ * Internal representation of a Router state.
16
16
  *
17
17
  * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].
18
18
  *
@@ -2,7 +2,7 @@ import { _StateDeclaration } from "./interface";
2
2
  import { StateObject } from "./stateObject";
3
3
  import { StateBuilder } from "./stateBuilder";
4
4
  import { StateRegistryListener } from "./stateRegistry";
5
- import { UIRouter } from "../router";
5
+ import { Router } from "../router";
6
6
  export declare class StateQueueManager {
7
7
  private router;
8
8
  states: {
@@ -12,7 +12,7 @@ export declare class StateQueueManager {
12
12
  listeners: StateRegistryListener[];
13
13
  queue: StateObject[];
14
14
  constructor(
15
- router: UIRouter,
15
+ router: Router,
16
16
  states: {
17
17
  [key: string]: StateObject;
18
18
  },
@@ -4,7 +4,7 @@ import { StateQueueManager } from "./stateQueueManager";
4
4
  import { StateDeclaration, _StateDeclaration } from "./interface";
5
5
  import { BuilderFunction } from "./stateBuilder";
6
6
  import { StateOrName } from "./interface";
7
- import { UIRouter } from "../router";
7
+ import { Router } from "../router";
8
8
  /**
9
9
  * The signature for the callback function provided to [[StateRegistry.onStatesChanged]].
10
10
  *
@@ -20,7 +20,7 @@ export declare type StateRegistryListener = (
20
20
  /**
21
21
  * A registry for all of the application's [[StateDeclaration]]s
22
22
  *
23
- * This API is found at `router.stateRegistry` ([[UIRouter.stateRegistry]])
23
+ * This API is found at `router.stateRegistry` ([[Router.stateRegistry]])
24
24
  */
25
25
  export declare class StateRegistry {
26
26
  init($injector: any): void;
@@ -35,7 +35,7 @@ export declare class StateRegistry {
35
35
  /** @internal */
36
36
  listeners: StateRegistryListener[];
37
37
  /** @internal */
38
- constructor(router: UIRouter);
38
+ constructor(router: Router);
39
39
  /** @internal */
40
40
  private _registerRoot;
41
41
  /**
@@ -73,7 +73,7 @@ export declare class StateRegistry {
73
73
  * Gets the implicit root state
74
74
  *
75
75
  * Gets the root of the state tree.
76
- * The root state is implicitly created by UI-Router.
76
+ * The root state is implicitly created by Router.
77
77
  * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]
78
78
  *
79
79
  * @return the root [[StateObject]]
@@ -10,18 +10,18 @@ import {
10
10
  import { StateObject } from "./stateObject";
11
11
  import { TargetState } from "./targetState";
12
12
  import { RawParams } from "../params/interface";
13
- import { UIRouter } from "../router";
14
- import { UIInjector } from "../interface";
13
+ import { Router } from "../router";
14
+ import { NGInjector } from "../interface";
15
15
  import { StateParams } from "../params/stateParams";
16
16
  export declare type OnInvalidCallback = (
17
17
  toState?: TargetState,
18
18
  fromState?: TargetState,
19
- injector?: UIInjector,
19
+ injector?: NGInjector,
20
20
  ) => HookResult;
21
21
  /**
22
22
  * Provides services related to ui-router states.
23
23
  *
24
- * This API is located at `router.stateService` ([[UIRouter.stateService]])
24
+ * This API is located at `router.stateService` ([[Router.stateService]])
25
25
  */
26
26
  export declare class StateService {
27
27
  private router;
@@ -30,29 +30,29 @@ export declare class StateService {
30
30
  /**
31
31
  * The [[Transition]] currently in progress (or null)
32
32
  *
33
- * @deprecated This is a passthrough through to [[UIRouterGlobals.transition]]
33
+ * @deprecated This is a passthrough through to [[RouterGlobals.transition]]
34
34
  */
35
35
  transition: Transition;
36
36
  /**
37
37
  * The latest successful state parameters
38
38
  *
39
- * @deprecated This is a passthrough through to [[UIRouterGlobals.params]]
39
+ * @deprecated This is a passthrough through to [[RouterGlobals.params]]
40
40
  */
41
41
  params: StateParams;
42
42
  /**
43
43
  * The current [[StateDeclaration]]
44
44
  *
45
- * @deprecated This is a passthrough through to [[UIRouterGlobals.current]]
45
+ * @deprecated This is a passthrough through to [[RouterGlobals.current]]
46
46
  */
47
47
  current: StateDeclaration;
48
48
  /**
49
49
  * The current [[StateObject]] (an internal API)
50
50
  *
51
- * @deprecated This is a passthrough through to [[UIRouterGlobals.$current]]
51
+ * @deprecated This is a passthrough through to [[RouterGlobals.$current]]
52
52
  */
53
53
  $current: StateObject;
54
54
  /** @internal */
55
- constructor(/** @internal */ router: UIRouter);
55
+ constructor(/** @internal */ router: Router);
56
56
 
57
57
  /**
58
58
  * Handler for when [[transitionTo]] is called with an invalid state.
@@ -25,7 +25,7 @@ import { RawParams } from "../params";
25
25
  * 3) and transition options
26
26
  * 4) the registered state object (the [[StateDeclaration]])
27
27
  *
28
- * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can
28
+ * Many Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can
29
29
  * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string).
30
30
  * The `TargetState` class normalizes those options.
31
31
  *
@@ -103,7 +103,7 @@ export interface TransitionHookOptions {
103
103
  *
104
104
  * Get a TreeChanges object using [[Transition.treeChanges]]
105
105
  *
106
- * A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition,
106
+ * A Router Transition is from one Path in a State Tree to another Path. For a given Transition,
107
107
  * this object stores the "to" and "from" paths, as well as subsets of those: the "retained",
108
108
  * "exiting" and "entering" paths.
109
109
  *
@@ -15,8 +15,8 @@ import { StateObject } from "../state/stateObject";
15
15
  import { TargetState } from "../state/targetState";
16
16
  import { Resolvable } from "../resolve/resolvable";
17
17
  import { ViewConfig } from "../view/interface";
18
- import { UIRouter } from "../router";
19
- import { UIInjector } from "../interface";
18
+ import { Router } from "../router";
19
+ import { NGInjector } from "../interface";
20
20
  import { ResolvableLiteral } from "../resolve/interface";
21
21
  import { Rejection } from "./rejectFactory";
22
22
  /**
@@ -37,11 +37,11 @@ export declare class Transition implements IHookRegistry {
37
37
  */
38
38
  $id: number;
39
39
  /**
40
- * A reference to the [[UIRouter]] instance
40
+ * A reference to the [[Router]] instance
41
41
  *
42
42
  * This reference can be used to access the router services, such as the [[StateService]]
43
43
  */
44
- router: UIRouter;
44
+ router: Router;
45
45
  /** @internal */
46
46
  private _deferred;
47
47
  /**
@@ -139,10 +139,10 @@ export declare class Transition implements IHookRegistry {
139
139
  * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`
140
140
  * encapsulates the "from state".
141
141
  * @param targetState The target state and parameters being transitioned to (also, the transition options)
142
- * @param router The [[UIRouter]] instance
142
+ * @param router The [[Router]] instance
143
143
  * @internal
144
144
  */
145
- constructor(fromPath: PathNode[], targetState: TargetState, router: UIRouter);
145
+ constructor(fromPath: PathNode[], targetState: TargetState, router: Router);
146
146
  private applyViewConfigs;
147
147
  /**
148
148
  * @internal
@@ -283,12 +283,12 @@ export declare class Transition implements IHookRegistry {
283
283
  };
284
284
  paramsChanged<T>(): T;
285
285
  /**
286
- * Creates a [[UIInjector]] Dependency Injector
286
+ * Creates a [[NGInjector]] Dependency Injector
287
287
  *
288
288
  * Returns a Dependency Injector for the Transition's target state (to state).
289
289
  * The injector provides resolve values which the target state has access to.
290
290
  *
291
- * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).
291
+ * The `NGInjector` can also provide values from the native root/global injector (ng1/ng2).
292
292
  *
293
293
  * #### Example:
294
294
  * ```js
@@ -300,7 +300,7 @@ export declare class Transition implements IHookRegistry {
300
300
  * ```
301
301
  *
302
302
  * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.
303
- * You can use [[UIInjector.getAsync]] to get a promise for the data.
303
+ * You can use [[NGInjector.getAsync]] to get a promise for the data.
304
304
  * #### Example:
305
305
  * ```js
306
306
  * .onBefore({}, trans => {
@@ -335,9 +335,9 @@ export declare class Transition implements IHookRegistry {
335
335
  * @param state Limits the resolves provided to only the resolves the provided state has access to.
336
336
  * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.
337
337
  *
338
- * @returns a [[UIInjector]]
338
+ * @returns a [[NGInjector]]
339
339
  */
340
- injector(state?: StateOrName, pathName?: string): UIInjector;
340
+ injector(state?: StateOrName, pathName?: string): NGInjector;
341
341
  /**
342
342
  * Gets all available resolve tokens (keys)
343
343
  *
@@ -376,7 +376,7 @@ export declare class Transition implements IHookRegistry {
376
376
  *
377
377
  * Allows a transition hook to dynamically add a Resolvable to this Transition.
378
378
  *
379
- * Use the [[Transition.injector]] to retrieve the resolved data in subsequent hooks ([[UIInjector.get]]).
379
+ * Use the [[Transition.injector]] to retrieve the resolved data in subsequent hooks ([[NGInjector.get]]).
380
380
  *
381
381
  * If a `state` argument is provided, the Resolvable is processed when that state is being entered.
382
382
  * If no `state` is provided then the root state is used.
@@ -17,7 +17,7 @@ import { RegisteredHook } from "./hookRegistry";
17
17
  import { TargetState } from "../state/targetState";
18
18
  import { PathNode } from "../path/pathNode";
19
19
  import { ViewService } from "../view/view";
20
- import { UIRouter } from "../router";
20
+ import { Router } from "../router";
21
21
  import { TransitionEventType } from "./transitionEventType";
22
22
  import { GetResultHandler, GetErrorHandler } from "./transitionHook";
23
23
  /**
@@ -77,9 +77,9 @@ export interface TransitionServicePluginAPI {
77
77
  * - It allows the default transition error handler to be set.
78
78
  * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).
79
79
  *
80
- * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.
80
+ * At bootstrap, [[Router]] creates a single instance (singleton) of this class.
81
81
  *
82
- * This API is located at `router.transitionService` ([[UIRouter.transitionService]])
82
+ * This API is located at `router.transitionService` ([[Router.transitionService]])
83
83
  */
84
84
  export declare class TransitionService implements IHookRegistry {
85
85
  /** @internal */
@@ -119,7 +119,7 @@ export declare class TransitionService implements IHookRegistry {
119
119
  lazyLoad: Function;
120
120
  };
121
121
  /** @internal */
122
- constructor(_router: UIRouter);
122
+ constructor(_router: Router);
123
123
  /**
124
124
  * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.
125
125
  *
@@ -200,7 +200,7 @@ export declare class TransitionService implements IHookRegistry {
200
200
  * dispose
201
201
  * @internal
202
202
  */
203
- dispose(router: UIRouter): void;
203
+ dispose(router: Router): void;
204
204
  /**
205
205
  * Creates a new [[Transition]] object
206
206
  *
@@ -9,7 +9,7 @@
9
9
  * @preferred
10
10
  */
11
11
  import { LocationConfig } from "../common";
12
- import { UIRouter } from "../router";
12
+ import { Router } from "../router";
13
13
  import {
14
14
  StateDeclaration,
15
15
  StateObject,
@@ -83,7 +83,7 @@ export interface MatchResult {
83
83
  * @return the matched value, either truthy or falsey
84
84
  */
85
85
  export interface UrlRuleMatchFn {
86
- (url?: UrlParts, router?: UIRouter): any;
86
+ (url?: UrlParts, router?: Router): any;
87
87
  }
88
88
  /**
89
89
  * Handler invoked when a rule is matched
@@ -98,7 +98,7 @@ export interface UrlRuleHandlerFn {
98
98
  (
99
99
  matchValue?: any,
100
100
  url?: UrlParts,
101
- router?: UIRouter,
101
+ router?: Router,
102
102
  ): string | TargetState | TargetStateDef | void;
103
103
  }
104
104
  /** @internal */
@@ -1,4 +1,4 @@
1
- import { UIRouter } from "../router";
1
+ import { Router } from "../router";
2
2
  import { ParamTypeDefinition, ParamTypes } from "../params";
3
3
  /**
4
4
  * An API to customize the URL behavior and retrieve URL configuration
@@ -11,7 +11,7 @@ import { ParamTypeDefinition, ParamTypes } from "../params";
11
11
  * This information can be used to build absolute URLs, such as
12
12
  * `https://example.com:443/basepath/state/substate?param1=a#hashvalue`;
13
13
  *
14
- * This API is found at `router.urlService.config` (see: [[UIRouter.urlService]], [[URLService.config]])
14
+ * This API is found at `router.urlService.config` (see: [[Router.urlService]], [[URLService.config]])
15
15
  */
16
16
  export declare class UrlConfig {
17
17
  private router;
@@ -20,7 +20,7 @@ export declare class UrlConfig {
20
20
  /** @internal */ _isCaseInsensitive: boolean;
21
21
  /** @internal */ _isStrictMode: boolean;
22
22
  /** @internal */ _defaultSquashPolicy: boolean | string;
23
- /** @internal */ constructor(/** @internal */ router: UIRouter);
23
+ /** @internal */ constructor(/** @internal */ router: Router);
24
24
  /** @internal */ dispose: () => void;
25
25
  /**
26
26
  * Gets the base Href, e.g., `http://localhost/approot/`
@@ -2,13 +2,13 @@ import { UrlMatcher } from "./urlMatcher";
2
2
  import { Param, ParamType, ParamTypeDefinition } from "../params";
3
3
  import { UrlMatcherCompileConfig } from "./interface";
4
4
  import { StateDeclaration } from "../state";
5
- import { UIRouter } from "../router";
5
+ import { Router } from "../router";
6
6
  export declare class ParamFactory {
7
7
  private router;
8
8
  fromConfig(id: string, type: ParamType, state: StateDeclaration): Param;
9
9
  fromPath(id: string, type: ParamType, state: StateDeclaration): Param;
10
10
  fromSearch(id: string, type: ParamType, state: StateDeclaration): Param;
11
- constructor(router: UIRouter);
11
+ constructor(router: Router);
12
12
  }
13
13
  /**
14
14
  * Factory for [[UrlMatcher]] instances.
@@ -22,7 +22,7 @@ export declare class UrlMatcherFactory {
22
22
  paramFactory: ParamFactory;
23
23
  UrlMatcher: typeof UrlMatcher;
24
24
  Param: typeof Param;
25
- constructor(/** @internal */ router: UIRouter);
25
+ constructor(/** @internal */ router: Router);
26
26
  /**
27
27
  * Creates a [[UrlMatcher]] for the specified pattern.
28
28
  *
@@ -1,6 +1,6 @@
1
1
  import { UrlMatcher } from "./urlMatcher";
2
2
  import { RawParams } from "../params";
3
- import { UIRouter } from "../router";
3
+ import { Router } from "../router";
4
4
  import { UrlRuleFactory } from "./urlRule";
5
5
  import { MatchResult, UrlParts, UrlRule, UrlRuleHandlerFn } from "./interface";
6
6
  import { TargetState, TargetStateDef } from "../state";
@@ -18,7 +18,7 @@ export declare class UrlRouter {
18
18
  urlRuleFactory: UrlRuleFactory;
19
19
  /** @internal */ private location;
20
20
  /** @internal */
21
- constructor(/** @internal */ router: UIRouter);
21
+ constructor(/** @internal */ router: Router);
22
22
  /** Internal API. */
23
23
  update(read?: boolean): void;
24
24
  /**
@@ -1,6 +1,6 @@
1
1
  import { StateDeclaration } from "../state";
2
2
  import { UrlMatcher } from "./urlMatcher";
3
- import { UIRouter } from "../router";
3
+ import { Router } from "../router";
4
4
  import { StateObject } from "../state/stateObject";
5
5
  import {
6
6
  UrlRule,
@@ -22,9 +22,9 @@ import {
22
22
  * - [[StateObject]]
23
23
  */
24
24
  export declare class UrlRuleFactory {
25
- router: UIRouter;
25
+ router: Router;
26
26
  static isUrlRule: (obj: any) => boolean;
27
- constructor(router: UIRouter);
27
+ constructor(router: Router);
28
28
  compile(str: string): UrlMatcher;
29
29
  create(
30
30
  what:
@@ -47,7 +47,7 @@ export declare class UrlRuleFactory {
47
47
  *
48
48
  * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]])
49
49
  * - url: the current Url ([[UrlParts]])
50
- * - router: the router object ([[UIRouter]])
50
+ * - router: the router object ([[Router]])
51
51
  *
52
52
  * #### Example:
53
53
  * ```js
@@ -89,7 +89,7 @@ export declare class UrlRuleFactory {
89
89
  */
90
90
  fromState(
91
91
  stateOrDecl: StateObject | StateDeclaration,
92
- router: UIRouter,
92
+ router: Router,
93
93
  ): StateRule;
94
94
  /**
95
95
  * A UrlRule which matches based on a regular expression
@@ -102,7 +102,7 @@ export declare class UrlRuleFactory {
102
102
  *
103
103
  * - regexp match array (from `regexp`)
104
104
  * - url: the current Url ([[UrlParts]])
105
- * - router: the router object ([[UIRouter]])
105
+ * - router: the router object ([[Router]])
106
106
  *
107
107
  * #### Example:
108
108
  * ```js