@angular-wave/angular.ts 0.0.30 → 0.0.33
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.
- package/dist/angular-ts.esm.js +1 -1
- package/dist/angular-ts.umd.js +1 -1
- package/index.html +5 -14
- package/package.json +1 -1
- package/src/core/compile.js +5 -4
- package/src/core/location.js +1 -1
- package/src/core/parser/parse.js +1 -2
- package/src/core/root-scope.js +49 -99
- package/src/directive/events.js +2 -1
- package/src/directive/model.js +4 -2
- package/src/router/directives/state-directives.js +33 -18
- package/src/router/directives/view-directive.js +1 -2
- package/src/router/globals.js +2 -0
- package/src/router/hooks/url.js +4 -4
- package/src/router/index.js +23 -27
- package/src/router/injectables.js +1 -52
- package/src/router/services.js +6 -84
- package/src/router/state/state-builder.js +7 -6
- package/src/router/state/state-queue-manager.js +2 -1
- package/src/router/state/state-registry.js +39 -21
- package/src/router/state/state-service.js +173 -6
- package/src/router/state/views.js +46 -2
- package/src/router/transition/reject-factory.js +0 -8
- package/src/router/transition/transition-service.js +43 -1
- package/src/router/url/url-config.js +32 -1
- package/src/router/url/url-rule.js +4 -4
- package/src/router/url/url-service.js +161 -14
- package/src/router/view/view.js +7 -51
- package/src/services/http.js +1 -1
- package/src/shared/common.js +1 -1
- package/src/shared/strings.js +7 -2
- package/test/core/compile.spec.js +2 -2
- package/test/core/scope.spec.js +2 -37
- package/test/router/services.spec.js +14 -31
- package/test/router/state-directives.spec.js +2 -2
- package/test/router/state-filter.spec.js +0 -2
- package/test/router/state.spec.js +4 -4
- package/test/router/template-factory.spec.js +19 -10
- package/test/router/{url-matcher-factory.spec.js → url-service.spec.js} +126 -132
- package/test/router/view-directive.spec.js +9 -9
- package/test/router/view-hook.spec.js +10 -10
- package/test/router/view.spec.js +4 -11
- package/types/router/core/params/interface.d.ts +2 -2
- package/types/router/core/url/urlMatcherFactory.d.ts +1 -1
- package/legacy/angular-animate.js +0 -4272
- package/legacy/angular-aria.js +0 -426
- package/legacy/angular-message-format.js +0 -1072
- package/legacy/angular-messages.js +0 -829
- package/legacy/angular-route.js +0 -1266
- package/legacy/angular-sanitize.js +0 -891
- package/legacy/angular.js +0 -36600
- package/src/router/router.js +0 -125
- package/src/router/url/url-matcher-factory.js +0 -76
- package/src/router/url/url-router.js +0 -101
- package/test/original-test.html +0 -33
|
@@ -5,7 +5,7 @@ import { isFunction } from "../../src/shared/utils";
|
|
|
5
5
|
import { wait } from "../test-utils";
|
|
6
6
|
|
|
7
7
|
describe("$state", () => {
|
|
8
|
-
let $
|
|
8
|
+
let $injector, template, ctrlName, $provide, $compile, module, $stateRegistry;
|
|
9
9
|
|
|
10
10
|
/** @type {import("../../src/router/stateProvider").StateProvider} */
|
|
11
11
|
let $stateProvider;
|
|
@@ -325,7 +325,7 @@ describe("$state", () => {
|
|
|
325
325
|
_$q_,
|
|
326
326
|
_$location_,
|
|
327
327
|
_$compile_,
|
|
328
|
-
_$
|
|
328
|
+
_$stateRegistry_,
|
|
329
329
|
) => {
|
|
330
330
|
$rootScope = _$rootScope_;
|
|
331
331
|
$state = _$state_;
|
|
@@ -334,7 +334,7 @@ describe("$state", () => {
|
|
|
334
334
|
$q = _$q_;
|
|
335
335
|
$location = _$location_;
|
|
336
336
|
$compile = _$compile_;
|
|
337
|
-
$
|
|
337
|
+
$stateRegistry = _$stateRegistry_;
|
|
338
338
|
},
|
|
339
339
|
);
|
|
340
340
|
});
|
|
@@ -926,7 +926,7 @@ describe("$state", () => {
|
|
|
926
926
|
|
|
927
927
|
// // test for #3081
|
|
928
928
|
it("injects resolve values from the exited state into onExit", async () => {
|
|
929
|
-
const registry = $
|
|
929
|
+
const registry = $stateRegistry;
|
|
930
930
|
registry.register({
|
|
931
931
|
name: "design",
|
|
932
932
|
url: "/design",
|
|
@@ -4,7 +4,14 @@ import { publishExternalAPI } from "../../src/public";
|
|
|
4
4
|
import { wait } from "../test-utils";
|
|
5
5
|
|
|
6
6
|
describe("templateFactory", () => {
|
|
7
|
-
let $injector,
|
|
7
|
+
let $injector,
|
|
8
|
+
$templateFactory,
|
|
9
|
+
$httpBackend,
|
|
10
|
+
$sce,
|
|
11
|
+
$scope,
|
|
12
|
+
$compile,
|
|
13
|
+
$stateRegistry,
|
|
14
|
+
$stateService;
|
|
8
15
|
|
|
9
16
|
beforeEach(() => {
|
|
10
17
|
dealoc(document.getElementById("dummy"));
|
|
@@ -87,7 +94,7 @@ describe("templateFactory", () => {
|
|
|
87
94
|
});
|
|
88
95
|
|
|
89
96
|
describe("component template builder", () => {
|
|
90
|
-
let
|
|
97
|
+
let el;
|
|
91
98
|
|
|
92
99
|
beforeEach(() => {
|
|
93
100
|
dealoc(document.getElementById("dummy"));
|
|
@@ -104,14 +111,16 @@ describe("templateFactory", () => {
|
|
|
104
111
|
_$httpBackend_,
|
|
105
112
|
_$sce_,
|
|
106
113
|
$rootScope,
|
|
107
|
-
_$
|
|
114
|
+
_$stateRegistry_,
|
|
115
|
+
_$state_,
|
|
108
116
|
_$compile_,
|
|
109
117
|
) => {
|
|
110
118
|
($templateFactory = _$templateFactory_),
|
|
111
119
|
($httpBackend = _$httpBackend_),
|
|
112
120
|
($sce = _$sce_);
|
|
113
121
|
$scope = $rootScope;
|
|
114
|
-
$
|
|
122
|
+
$stateRegistry = _$stateRegistry_;
|
|
123
|
+
$stateService = _$state_;
|
|
115
124
|
$compile = _$compile_;
|
|
116
125
|
},
|
|
117
126
|
);
|
|
@@ -119,26 +128,26 @@ describe("templateFactory", () => {
|
|
|
119
128
|
});
|
|
120
129
|
|
|
121
130
|
it("should not prefix the components dom element with anything", async () => {
|
|
122
|
-
$
|
|
123
|
-
$
|
|
131
|
+
$stateRegistry.register({ name: "cmp", component: "myComponent" });
|
|
132
|
+
$stateService.go("cmp");
|
|
124
133
|
$scope.$digest();
|
|
125
134
|
await wait(100);
|
|
126
135
|
expect(el.html()).toMatch(/\<my-component/);
|
|
127
136
|
});
|
|
128
137
|
|
|
129
138
|
it("should prefix the components dom element with x- for components named dataFoo", () => {
|
|
130
|
-
$
|
|
139
|
+
$stateRegistry.register({
|
|
131
140
|
name: "cmp",
|
|
132
141
|
component: "dataComponent",
|
|
133
142
|
});
|
|
134
|
-
$
|
|
143
|
+
$stateService.go("cmp");
|
|
135
144
|
$scope.$digest();
|
|
136
145
|
expect(el.html()).toMatch(/\<x-data-component/);
|
|
137
146
|
});
|
|
138
147
|
|
|
139
148
|
it("should prefix the components dom element with x- for components named xFoo", () => {
|
|
140
|
-
$
|
|
141
|
-
$
|
|
149
|
+
$stateRegistry.register({ name: "cmp", component: "xComponent" });
|
|
150
|
+
$stateService.go("cmp");
|
|
142
151
|
$scope.$digest();
|
|
143
152
|
expect(el.html()).toMatch(/\<x-x-component/);
|
|
144
153
|
});
|