@angular-wave/angular.ts 0.0.21 → 0.0.22

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 (122) hide show
  1. package/Makefile +1 -1
  2. package/TODO.md +14 -0
  3. package/dist/angular-ts.esm.js +1 -1
  4. package/dist/angular-ts.umd.js +1 -1
  5. package/index.html +2 -0
  6. package/package.json +1 -1
  7. package/src/animations/animate-css-driver.js +2 -2
  8. package/src/animations/animate-css.js +15 -6
  9. package/src/animations/animate-js.js +1 -1
  10. package/src/animations/animate-queue.js +1 -1
  11. package/src/animations/shared.js +0 -14
  12. package/src/core/compile.js +6 -3
  13. package/src/directive/if.js +0 -79
  14. package/src/directive/if.md +80 -0
  15. package/src/directive/include.js +0 -82
  16. package/src/directive/include.md +86 -0
  17. package/src/directive/repeat.js +0 -1
  18. package/src/loader.js +0 -1
  19. package/src/router/common/trace.js +1 -1
  20. package/src/router/directives/stateDirectives.js +16 -14
  21. package/src/router/directives/viewDirective.js +2 -2
  22. package/src/router/hooks/resolve.js +3 -4
  23. package/src/router/hooks/views.js +3 -2
  24. package/src/router/state/stateService.js +1 -2
  25. package/src/router/transition/interface.js +14 -14
  26. package/src/router/transition/rejectFactory.js +29 -20
  27. package/src/router/transition/transitionHook.js +5 -5
  28. package/src/router/url/urlMatcher.js +1 -2
  29. package/src/router/url/urlRule.js +1 -1
  30. package/src/router/url/urlRules.js +1 -1
  31. package/src/shared/common.js +0 -1
  32. package/test/module-test.html +44 -12
  33. package/test/router/services.spec.js +71 -0
  34. package/test/router/state-directives.spec.js +1208 -0
  35. package/types/angular.d.ts +132 -124
  36. package/types/index.d.ts +2350 -2187
  37. package/types/jqlite.d.ts +463 -418
  38. package/types/router/core/common/common.d.ts +70 -24
  39. package/types/router/core/common/coreservices.d.ts +30 -32
  40. package/types/router/core/common/glob.d.ts +9 -9
  41. package/types/router/core/common/hof.d.ts +12 -4
  42. package/types/router/core/common/index.d.ts +8 -8
  43. package/types/router/core/common/predicates.d.ts +1 -1
  44. package/types/router/core/common/queue.d.ts +13 -13
  45. package/types/router/core/common/safeConsole.d.ts +3 -3
  46. package/types/router/core/common/strings.d.ts +4 -2
  47. package/types/router/core/common/trace.d.ts +94 -82
  48. package/types/router/core/globals.d.ts +37 -37
  49. package/types/router/core/hooks/coreResolvables.d.ts +5 -3
  50. package/types/router/core/hooks/ignoredTransition.d.ts +4 -2
  51. package/types/router/core/hooks/invalidTransition.d.ts +4 -2
  52. package/types/router/core/hooks/lazyLoad.d.ts +10 -5
  53. package/types/router/core/hooks/onEnterExitRetain.d.ts +10 -4
  54. package/types/router/core/hooks/redirectTo.d.ts +4 -2
  55. package/types/router/core/hooks/resolve.d.ts +10 -4
  56. package/types/router/core/hooks/updateGlobals.d.ts +4 -2
  57. package/types/router/core/hooks/url.d.ts +4 -2
  58. package/types/router/core/hooks/views.d.ts +7 -3
  59. package/types/router/core/index.d.ts +11 -12
  60. package/types/router/core/interface.d.ts +83 -81
  61. package/types/router/core/params/index.d.ts +5 -5
  62. package/types/router/core/params/interface.d.ts +439 -439
  63. package/types/router/core/params/param.d.ts +72 -60
  64. package/types/router/core/params/paramType.d.ts +40 -40
  65. package/types/router/core/params/paramTypes.d.ts +169 -165
  66. package/types/router/core/params/stateParams.d.ts +13 -13
  67. package/types/router/core/path/index.d.ts +2 -2
  68. package/types/router/core/path/pathNode.d.ts +49 -49
  69. package/types/router/core/path/pathUtils.d.ts +100 -74
  70. package/types/router/core/resolve/index.d.ts +3 -3
  71. package/types/router/core/resolve/interface.d.ts +137 -137
  72. package/types/router/core/resolve/resolvable.d.ts +60 -54
  73. package/types/router/core/resolve/resolveContext.d.ts +84 -79
  74. package/types/router/core/router.d.ts +95 -86
  75. package/types/router/core/state/index.d.ts +8 -8
  76. package/types/router/core/state/interface.d.ts +667 -643
  77. package/types/router/core/state/stateBuilder.d.ts +41 -38
  78. package/types/router/core/state/stateMatcher.d.ts +11 -9
  79. package/types/router/core/state/stateObject.d.ts +154 -139
  80. package/types/router/core/state/stateQueueManager.d.ts +26 -21
  81. package/types/router/core/state/stateRegistry.d.ts +124 -121
  82. package/types/router/core/state/stateService.d.ts +380 -343
  83. package/types/router/core/state/targetState.d.ts +74 -69
  84. package/types/router/core/transition/hookBuilder.d.ts +34 -30
  85. package/types/router/core/transition/hookRegistry.d.ts +96 -74
  86. package/types/router/core/transition/index.d.ts +8 -8
  87. package/types/router/core/transition/interface.d.ts +652 -609
  88. package/types/router/core/transition/rejectFactory.d.ts +97 -97
  89. package/types/router/core/transition/transition.d.ts +565 -517
  90. package/types/router/core/transition/transitionEventType.d.ts +20 -11
  91. package/types/router/core/transition/transitionHook.d.ts +90 -82
  92. package/types/router/core/transition/transitionService.d.ts +228 -161
  93. package/types/router/core/url/index.d.ts +8 -8
  94. package/types/router/core/url/interface.d.ts +100 -87
  95. package/types/router/core/url/urlConfig.d.ts +130 -126
  96. package/types/router/core/url/urlMatcher.d.ts +132 -127
  97. package/types/router/core/url/urlMatcherFactory.d.ts +46 -42
  98. package/types/router/core/url/urlRouter.d.ts +91 -75
  99. package/types/router/core/url/urlRule.d.ts +123 -100
  100. package/types/router/core/url/urlRules.d.ts +240 -232
  101. package/types/router/core/url/urlService.d.ts +201 -201
  102. package/types/router/core/view/index.d.ts +2 -2
  103. package/types/router/core/view/interface.d.ts +26 -26
  104. package/types/router/core/view/view.d.ts +152 -143
  105. package/types/router/directives/viewDirective.d.ts +12 -11
  106. package/types/router/index.d.ts +11 -12
  107. package/types/router/interface.d.ts +361 -351
  108. package/types/router/legacy/resolveService.d.ts +44 -40
  109. package/types/router/legacy/stateEvents.d.ts +1 -1
  110. package/types/router/locationServices.d.ts +45 -37
  111. package/types/router/services.d.ts +9 -9
  112. package/types/router/stateFilters.d.ts +3 -3
  113. package/types/router/stateProvider.d.ts +240 -235
  114. package/types/router/statebuilders/onEnterExitRetain.d.ts +4 -2
  115. package/types/router/statebuilders/views.d.ts +35 -22
  116. package/types/router/templateFactory.d.ts +99 -79
  117. package/types/router/viewScroll.d.ts +7 -7
  118. package/src/directive/a.js +0 -37
  119. package/types/router/angular.d.ts +0 -1
  120. package/types/router/core/vanilla.d.ts +0 -1
  121. package/types/router/directives/stateDirectives.d.ts +0 -3
  122. package/types/router/injectables.d.ts +0 -1
@@ -1,7 +1,7 @@
1
- import { ResolvePolicy, ResolvableLiteral } from './interface';
2
- import { ResolveContext } from './resolveContext';
3
- import { Transition } from '../transition/transition';
4
- import { StateObject } from '../state/stateObject';
1
+ import { ResolvePolicy, ResolvableLiteral } from "./interface";
2
+ import { ResolveContext } from "./resolveContext";
3
+ import { Transition } from "../transition/transition";
4
+ import { StateObject } from "../state/stateObject";
5
5
  export declare let defaultResolvePolicy: ResolvePolicy;
6
6
  /**
7
7
  * The basic building block for the resolve system.
@@ -16,54 +16,60 @@ export declare let defaultResolvePolicy: ResolvePolicy;
16
16
  * parameter to those fns.
17
17
  */
18
18
  export declare class Resolvable implements ResolvableLiteral {
19
- token: any;
20
- policy: ResolvePolicy;
21
- resolveFn: Function;
22
- deps: any[];
23
- data: any;
24
- resolved: boolean;
25
- promise: Promise<any>;
26
- static fromData: (token: any, data: any) => Resolvable;
27
- /** This constructor creates a Resolvable copy */
28
- constructor(resolvable: Resolvable);
29
- /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */
30
- constructor(resolvable: ResolvableLiteral);
31
- /**
32
- * This constructor creates a new `Resolvable`
33
- *
34
- * #### Example:
35
- * ```js
36
- * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]);
37
- *
38
- * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]);
39
- *
40
- * var resolvable1Clone = new Resolvable(resolvable1);
41
- * ```
42
- *
43
- * @param token The new resolvable's injection token, such as `"userList"` (a string) or `UserService` (a class).
44
- * When this token is used during injection, the resolved value will be injected.
45
- * @param resolveFn The function that returns the resolved value, or a promise for the resolved value
46
- * @param deps An array of dependencies, which will be injected into the `resolveFn`
47
- * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed
48
- * @param data Pre-resolved data. If the resolve value is already known, it may be provided here.
49
- */
50
- constructor(token: any, resolveFn: Function, deps?: any[], policy?: ResolvePolicy, data?: any);
51
- getPolicy(state: StateObject): ResolvePolicy;
52
- /**
53
- * Asynchronously resolve this Resolvable's data
54
- *
55
- * Given a ResolveContext that this Resolvable is found in:
56
- * Wait for this Resolvable's dependencies, then invoke this Resolvable's function
57
- * and update the Resolvable's state
58
- */
59
- resolve(resolveContext: ResolveContext, trans?: Transition): Promise<any>;
60
- /**
61
- * Gets a promise for this Resolvable's data.
62
- *
63
- * Fetches the data and returns a promise.
64
- * Returns the existing promise if it has already been fetched once.
65
- */
66
- get(resolveContext: ResolveContext, trans?: Transition): Promise<any>;
67
- toString(): string;
68
- clone(): Resolvable;
19
+ token: any;
20
+ policy: ResolvePolicy;
21
+ resolveFn: Function;
22
+ deps: any[];
23
+ data: any;
24
+ resolved: boolean;
25
+ promise: Promise<any>;
26
+ static fromData: (token: any, data: any) => Resolvable;
27
+ /** This constructor creates a Resolvable copy */
28
+ constructor(resolvable: Resolvable);
29
+ /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */
30
+ constructor(resolvable: ResolvableLiteral);
31
+ /**
32
+ * This constructor creates a new `Resolvable`
33
+ *
34
+ * #### Example:
35
+ * ```js
36
+ * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]);
37
+ *
38
+ * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]);
39
+ *
40
+ * var resolvable1Clone = new Resolvable(resolvable1);
41
+ * ```
42
+ *
43
+ * @param token The new resolvable's injection token, such as `"userList"` (a string) or `UserService` (a class).
44
+ * When this token is used during injection, the resolved value will be injected.
45
+ * @param resolveFn The function that returns the resolved value, or a promise for the resolved value
46
+ * @param deps An array of dependencies, which will be injected into the `resolveFn`
47
+ * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed
48
+ * @param data Pre-resolved data. If the resolve value is already known, it may be provided here.
49
+ */
50
+ constructor(
51
+ token: any,
52
+ resolveFn: Function,
53
+ deps?: any[],
54
+ policy?: ResolvePolicy,
55
+ data?: any,
56
+ );
57
+ getPolicy(state: StateObject): ResolvePolicy;
58
+ /**
59
+ * Asynchronously resolve this Resolvable's data
60
+ *
61
+ * Given a ResolveContext that this Resolvable is found in:
62
+ * Wait for this Resolvable's dependencies, then invoke this Resolvable's function
63
+ * and update the Resolvable's state
64
+ */
65
+ resolve(resolveContext: ResolveContext, trans?: Transition): Promise<any>;
66
+ /**
67
+ * Gets a promise for this Resolvable's data.
68
+ *
69
+ * Fetches the data and returns a promise.
70
+ * Returns the existing promise if it has already been fetched once.
71
+ */
72
+ get(resolveContext: ResolveContext, trans?: Transition): Promise<any>;
73
+ toString(): string;
74
+ clone(): Resolvable;
69
75
  }
@@ -1,9 +1,9 @@
1
- import { PolicyWhen, ResolvePolicy } from './interface';
2
- import { PathNode } from '../path/pathNode';
3
- import { Resolvable } from './resolvable';
4
- import { StateObject } from '../state/stateObject';
5
- import { Transition } from '../transition/transition';
6
- import { UIInjector } from '../interface';
1
+ import { PolicyWhen, ResolvePolicy } from "./interface";
2
+ import { PathNode } from "../path/pathNode";
3
+ import { Resolvable } from "./resolvable";
4
+ import { StateObject } from "../state/stateObject";
5
+ import { Transition } from "../transition/transition";
6
+ import { UIInjector } from "../interface";
7
7
  export declare const NATIVE_INJECTOR_TOKEN: string;
8
8
  /**
9
9
  * Encapsulates Dependency Injection for a path of nodes
@@ -16,77 +16,82 @@ export declare const NATIVE_INJECTOR_TOKEN: string;
16
16
  * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path.
17
17
  */
18
18
  export declare class ResolveContext {
19
- private _path;
20
- _injector: UIInjector;
21
- constructor(_path: PathNode[]);
22
- /** Gets all the tokens found in the resolve context, de-duplicated */
23
- getTokens(): any[];
24
- /**
25
- * Gets the Resolvable that matches the token
26
- *
27
- * Gets the last Resolvable that matches the token in this context, or undefined.
28
- * Throws an error if it doesn't exist in the ResolveContext
29
- */
30
- getResolvable(token: any): Resolvable;
31
- /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */
32
- getPolicy(resolvable: Resolvable): ResolvePolicy;
33
- /**
34
- * Returns a ResolveContext that includes a portion of this one
35
- *
36
- * Given a state, this method creates a new ResolveContext from this one.
37
- * The new context starts at the first node (root) and stops at the node for the `state` parameter.
38
- *
39
- * #### Why
40
- *
41
- * When a transition is created, the nodes in the "To Path" are injected from a ResolveContext.
42
- * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.
43
- * The "To State" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).
44
- * This method is used to create a narrower context when injecting ancestor nodes.
45
- *
46
- * @example
47
- * `let ABCD = new ResolveContext([A, B, C, D]);`
48
- *
49
- * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:
50
- * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.
51
- * However, `B` should only be able to access resolvables from `A`, `B`.
52
- *
53
- * When resolving for the `B` node, first take the full "To Path" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.
54
- * `let AB = ABCD.subcontext(a)`
55
- */
56
- subContext(state: StateObject): ResolveContext;
57
- /**
58
- * Adds Resolvables to the node that matches the state
59
- *
60
- * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).
61
- * The resolvable is added to the node matching the `state` parameter.
62
- *
63
- * These new resolvables are not automatically fetched.
64
- * The calling code should either fetch them, fetch something that depends on them,
65
- * or rely on [[resolvePath]] being called when some state is being entered.
66
- *
67
- * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.
68
- *
69
- * @param newResolvables the new Resolvables
70
- * @param state Used to find the node to put the resolvable on
71
- */
72
- addResolvables(newResolvables: Resolvable[], state: StateObject): void;
73
- /**
74
- * Returns a promise for an array of resolved path Element promises
75
- *
76
- * @param when
77
- * @param trans
78
- * @returns {Promise<any>|any}
79
- */
80
- resolvePath(when?: PolicyWhen, trans?: Transition): Promise<{
81
- token: any;
82
- value: any;
83
- }[]>;
84
- injector(): UIInjector;
85
- findNode(resolvable: Resolvable): PathNode;
86
- /**
87
- * Gets the async dependencies of a Resolvable
88
- *
89
- * Given a Resolvable, returns its dependencies as a Resolvable[]
90
- */
91
- getDependencies(resolvable: Resolvable): Resolvable[];
19
+ private _path;
20
+ _injector: UIInjector;
21
+ constructor(_path: PathNode[]);
22
+ /** Gets all the tokens found in the resolve context, de-duplicated */
23
+ getTokens(): any[];
24
+ /**
25
+ * Gets the Resolvable that matches the token
26
+ *
27
+ * Gets the last Resolvable that matches the token in this context, or undefined.
28
+ * Throws an error if it doesn't exist in the ResolveContext
29
+ */
30
+ getResolvable(token: any): Resolvable;
31
+ /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */
32
+ getPolicy(resolvable: Resolvable): ResolvePolicy;
33
+ /**
34
+ * Returns a ResolveContext that includes a portion of this one
35
+ *
36
+ * Given a state, this method creates a new ResolveContext from this one.
37
+ * The new context starts at the first node (root) and stops at the node for the `state` parameter.
38
+ *
39
+ * #### Why
40
+ *
41
+ * When a transition is created, the nodes in the "To Path" are injected from a ResolveContext.
42
+ * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.
43
+ * The "To State" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).
44
+ * This method is used to create a narrower context when injecting ancestor nodes.
45
+ *
46
+ * @example
47
+ * `let ABCD = new ResolveContext([A, B, C, D]);`
48
+ *
49
+ * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:
50
+ * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.
51
+ * However, `B` should only be able to access resolvables from `A`, `B`.
52
+ *
53
+ * When resolving for the `B` node, first take the full "To Path" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.
54
+ * `let AB = ABCD.subcontext(a)`
55
+ */
56
+ subContext(state: StateObject): ResolveContext;
57
+ /**
58
+ * Adds Resolvables to the node that matches the state
59
+ *
60
+ * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).
61
+ * The resolvable is added to the node matching the `state` parameter.
62
+ *
63
+ * These new resolvables are not automatically fetched.
64
+ * The calling code should either fetch them, fetch something that depends on them,
65
+ * or rely on [[resolvePath]] being called when some state is being entered.
66
+ *
67
+ * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.
68
+ *
69
+ * @param newResolvables the new Resolvables
70
+ * @param state Used to find the node to put the resolvable on
71
+ */
72
+ addResolvables(newResolvables: Resolvable[], state: StateObject): void;
73
+ /**
74
+ * Returns a promise for an array of resolved path Element promises
75
+ *
76
+ * @param when
77
+ * @param trans
78
+ * @returns {Promise<any>|any}
79
+ */
80
+ resolvePath(
81
+ when?: PolicyWhen,
82
+ trans?: Transition,
83
+ ): Promise<
84
+ {
85
+ token: any;
86
+ value: any;
87
+ }[]
88
+ >;
89
+ injector(): UIInjector;
90
+ findNode(resolvable: Resolvable): PathNode;
91
+ /**
92
+ * Gets the async dependencies of a Resolvable
93
+ *
94
+ * Given a Resolvable, returns its dependencies as a Resolvable[]
95
+ */
96
+ getDependencies(resolvable: Resolvable): Resolvable[];
92
97
  }
@@ -1,95 +1,104 @@
1
- import { UrlMatcherFactory } from './url/urlMatcherFactory';
2
- import { UrlRouter } from './url/urlRouter';
3
- import { TransitionService } from './transition/transitionService';
4
- import { ViewService } from './view/view';
5
- import { StateRegistry } from './state/stateRegistry';
6
- import { StateService } from './state/stateService';
7
- import { UIRouterGlobals } from './globals';
8
- import { UIRouterPlugin, Disposable } from './interface';
9
- import { UrlService } from './url/urlService';
10
- import { LocationServices, LocationConfig } from './common/coreservices';
11
- import { Trace } from './common/trace';
1
+ import { UrlMatcherFactory } from "./url/urlMatcherFactory";
2
+ import { UrlRouter } from "./url/urlRouter";
3
+ import { TransitionService } from "./transition/transitionService";
4
+ import { ViewService } from "./view/view";
5
+ import { StateRegistry } from "./state/stateRegistry";
6
+ import { StateService } from "./state/stateService";
7
+ import { UIRouterGlobals } from "./globals";
8
+ import { UIRouterPlugin, Disposable } from "./interface";
9
+ import { UrlService } from "./url/urlService";
10
+ import { LocationServices, LocationConfig } from "./common/coreservices";
11
+ import { Trace } from "./common/trace";
12
12
  /**
13
13
  * An instance of UI-Router.
14
14
  *
15
15
  * This object contains references to service APIs which define your application's routing behavior.
16
16
  */
17
17
  export declare class UIRouter {
18
- locationService: LocationServices;
19
- locationConfig: LocationConfig;
20
- /** @internal */ $id: number;
21
- /** @internal */ _disposed: boolean;
22
- /** @internal */ private _disposables;
23
- /** Enable/disable tracing to the javascript console */
24
- trace: Trace;
25
- /** Provides services related to ui-view synchronization */
26
- viewService: ViewService;
27
- /** An object that contains global router state, such as the current state and params */
28
- globals: UIRouterGlobals;
29
- /** A service that exposes global Transition Hooks */
30
- transitionService: TransitionService;
31
- /**
32
- * Deprecated for public use. Use [[urlService]] instead.
33
- * @deprecated Use [[urlService]] instead
34
- */
35
- urlMatcherFactory: UrlMatcherFactory;
36
- /**
37
- * Deprecated for public use. Use [[urlService]] instead.
38
- * @deprecated Use [[urlService]] instead
39
- */
40
- urlRouter: UrlRouter;
41
- /** Provides services related to the URL */
42
- urlService: UrlService;
43
- /** Provides a registry for states, and related registration services */
44
- stateRegistry: StateRegistry;
45
- /** Provides services related to states */
46
- stateService: StateService;
47
- /** @internal plugin instances are registered here */
48
- private _plugins;
49
- /** Registers an object to be notified when the router is disposed */
50
- disposable(disposable: Disposable): void;
51
- /**
52
- * Disposes this router instance
53
- *
54
- * When called, clears resources retained by the router by calling `dispose(this)` on all
55
- * registered [[disposable]] objects.
56
- *
57
- * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.
58
- *
59
- * @internal
60
- * @param disposable (optional) the disposable to dispose
61
- */
62
- dispose(disposable?: any): void;
63
- /**
64
- * Creates a new `UIRouter` object
65
- *
66
- * @param locationService a [[LocationServices]] implementation
67
- * @param locationConfig a [[LocationConfig]] implementation
68
- * @internal
69
- */
70
- constructor(locationService?: LocationServices, locationConfig?: LocationConfig);
71
- /** Add plugin (as ES6 class) */
72
- plugin<T extends UIRouterPlugin>(plugin: {
73
- new (router: UIRouter, options?: any): T;
74
- }, options?: any): T;
75
- /** Add plugin (as javascript constructor function) */
76
- plugin<T extends UIRouterPlugin>(plugin: {
77
- (router: UIRouter, options?: any): void;
78
- }, options?: any): T;
79
- /** Add plugin (as javascript factory function) */
80
- plugin<T extends UIRouterPlugin>(plugin: PluginFactory<T>, options?: any): T;
81
- /**
82
- * Returns a plugin registered with the given `pluginName`.
83
- *
84
- * @param pluginName the name of the plugin to get
85
- * @return the plugin, or undefined
86
- */
87
- getPlugin(pluginName: string): UIRouterPlugin;
88
- /**
89
- * Returns all registered plugins
90
- * @return all registered plugins
91
- */
92
- getPlugin(): UIRouterPlugin[];
18
+ locationService: LocationServices;
19
+ locationConfig: LocationConfig;
20
+ /** @internal */ $id: number;
21
+ /** @internal */ _disposed: boolean;
22
+ /** @internal */ private _disposables;
23
+ /** Enable/disable tracing to the javascript console */
24
+ trace: Trace;
25
+ /** Provides services related to ui-view synchronization */
26
+ viewService: ViewService;
27
+ /** An object that contains global router state, such as the current state and params */
28
+ globals: UIRouterGlobals;
29
+ /** A service that exposes global Transition Hooks */
30
+ transitionService: TransitionService;
31
+ /**
32
+ * Deprecated for public use. Use [[urlService]] instead.
33
+ * @deprecated Use [[urlService]] instead
34
+ */
35
+ urlMatcherFactory: UrlMatcherFactory;
36
+ /**
37
+ * Deprecated for public use. Use [[urlService]] instead.
38
+ * @deprecated Use [[urlService]] instead
39
+ */
40
+ urlRouter: UrlRouter;
41
+ /** Provides services related to the URL */
42
+ urlService: UrlService;
43
+ /** Provides a registry for states, and related registration services */
44
+ stateRegistry: StateRegistry;
45
+ /** Provides services related to states */
46
+ stateService: StateService;
47
+ /** @internal plugin instances are registered here */
48
+ private _plugins;
49
+ /** Registers an object to be notified when the router is disposed */
50
+ disposable(disposable: Disposable): void;
51
+ /**
52
+ * Disposes this router instance
53
+ *
54
+ * When called, clears resources retained by the router by calling `dispose(this)` on all
55
+ * registered [[disposable]] objects.
56
+ *
57
+ * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.
58
+ *
59
+ * @internal
60
+ * @param disposable (optional) the disposable to dispose
61
+ */
62
+ dispose(disposable?: any): void;
63
+ /**
64
+ * Creates a new `UIRouter` object
65
+ *
66
+ * @param locationService a [[LocationServices]] implementation
67
+ * @param locationConfig a [[LocationConfig]] implementation
68
+ * @internal
69
+ */
70
+ constructor(
71
+ locationService?: LocationServices,
72
+ locationConfig?: LocationConfig,
73
+ );
74
+ /** Add plugin (as ES6 class) */
75
+ plugin<T extends UIRouterPlugin>(
76
+ plugin: {
77
+ new (router: UIRouter, options?: any): T;
78
+ },
79
+ options?: any,
80
+ ): T;
81
+ /** Add plugin (as javascript constructor function) */
82
+ plugin<T extends UIRouterPlugin>(
83
+ plugin: {
84
+ (router: UIRouter, options?: any): void;
85
+ },
86
+ options?: any,
87
+ ): T;
88
+ /** Add plugin (as javascript factory function) */
89
+ plugin<T extends UIRouterPlugin>(plugin: PluginFactory<T>, options?: any): T;
90
+ /**
91
+ * Returns a plugin registered with the given `pluginName`.
92
+ *
93
+ * @param pluginName the name of the plugin to get
94
+ * @return the plugin, or undefined
95
+ */
96
+ getPlugin(pluginName: string): UIRouterPlugin;
97
+ /**
98
+ * Returns all registered plugins
99
+ * @return all registered plugins
100
+ */
101
+ getPlugin(): UIRouterPlugin[];
93
102
  }
94
103
  /** @internal */
95
104
  export declare type PluginFactory<T> = (router: UIRouter, options?: any) => T;
@@ -18,11 +18,11 @@
18
18
  *
19
19
  * @packageDocumentation
20
20
  */
21
- export * from './interface';
22
- export * from './stateBuilder';
23
- export * from './stateObject';
24
- export * from './stateMatcher';
25
- export * from './stateQueueManager';
26
- export * from './stateRegistry';
27
- export * from './stateService';
28
- export * from './targetState';
21
+ export * from "./interface";
22
+ export * from "./stateBuilder";
23
+ export * from "./stateObject";
24
+ export * from "./stateMatcher";
25
+ export * from "./stateQueueManager";
26
+ export * from "./stateRegistry";
27
+ export * from "./stateService";
28
+ export * from "./targetState";