UNPKG

1.05 kBJavaScriptView Raw
1/**
2 * @coreapi
3 * @module core
4 */ /** */
5import { StateParams } from "./params/stateParams";
6import { Queue } from "./common/queue";
7/**
8 * Global router state
9 *
10 * This is where we hold the global mutable state such as current state, current
11 * params, current transition, etc.
12 */
13var UIRouterGlobals = (function () {
14 function UIRouterGlobals() {
15 /**
16 * Current parameter values
17 *
18 * The parameter values from the latest successful transition
19 */
20 this.params = new StateParams();
21 /** @internalapi */
22 this.lastStartedTransitionId = -1;
23 /** @internalapi */
24 this.transitionHistory = new Queue([], 1);
25 /** @internalapi */
26 this.successfulTransitions = new Queue([], 1);
27 }
28 UIRouterGlobals.prototype.dispose = function () {
29 this.transitionHistory.clear();
30 this.successfulTransitions.clear();
31 this.transition = null;
32 };
33 return UIRouterGlobals;
34}());
35export { UIRouterGlobals };
36//# sourceMappingURL=globals.js.map
\No newline at end of file