UNPKG

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