1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.registerResolveRemaining = exports.registerLazyResolveState = exports.registerEagerResolvePath = exports.RESOLVE_HOOK_PRIORITY = void 0;
|
4 | var common_1 = require("../common/common");
|
5 | var resolveContext_1 = require("../resolve/resolveContext");
|
6 | var hof_1 = require("../common/hof");
|
7 | exports.RESOLVE_HOOK_PRIORITY = 1000;
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | var eagerResolvePath = function (trans) {
|
18 | return new resolveContext_1.ResolveContext(trans.treeChanges().to).resolvePath('EAGER', trans).then(common_1.noop);
|
19 | };
|
20 | exports.registerEagerResolvePath = function (transitionService) {
|
21 | return transitionService.onStart({}, eagerResolvePath, { priority: exports.RESOLVE_HOOK_PRIORITY });
|
22 | };
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | var lazyResolveState = function (trans, state) {
|
33 | return new resolveContext_1.ResolveContext(trans.treeChanges().to).subContext(state.$$state()).resolvePath('LAZY', trans).then(common_1.noop);
|
34 | };
|
35 | exports.registerLazyResolveState = function (transitionService) {
|
36 | return transitionService.onEnter({ entering: hof_1.val(true) }, lazyResolveState, { priority: exports.RESOLVE_HOOK_PRIORITY });
|
37 | };
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | var resolveRemaining = function (trans) {
|
49 | return new resolveContext_1.ResolveContext(trans.treeChanges().to).resolvePath('LAZY', trans).then(common_1.noop);
|
50 | };
|
51 | exports.registerResolveRemaining = function (transitionService) {
|
52 | return transitionService.onFinish({}, resolveRemaining, { priority: exports.RESOLVE_HOOK_PRIORITY });
|
53 | };
|
54 |
|
\ | No newline at end of file |