@angular-wave/angular.ts 0.4.3 → 0.4.4
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.umd.js +10 -0
- package/index.html +74 -3
- package/package.json +1 -1
- package/src/angular.spec.js +0 -5
- package/src/animations/animate-css.js +5 -13
- package/src/animations/animate-queue.js +22 -21
- package/src/animations/animate-runner.js +4 -8
- package/src/animations/animate.md +1 -1
- package/src/animations/animate.spec.js +0 -21
- package/src/animations/animation.js +1 -1
- package/src/binding.spec.js +0 -1
- package/src/core/cache/cache.js +2 -29
- package/src/core/compile/compile.js +26 -27
- package/src/core/compile/compile.spec.js +17 -266
- package/src/core/compile/compile.test.js +1 -1
- package/src/core/controller/controller.js +2 -0
- package/src/core/di/injector.md +1 -1
- package/src/core/di/injector.spec.js +0 -2
- package/src/core/di/internal-injector.js +2 -1
- package/src/core/interpolate/interpolate.js +16 -3
- package/src/core/interpolate/interpolate.spec.js +70 -16
- package/src/core/interval/interval.test.js +1 -1
- package/src/core/location/location.js +0 -2
- package/src/core/location/location.spec.js +27 -27
- package/src/core/{scope/scope.html → model/model.html} +1 -1
- package/src/core/model/model.js +944 -0
- package/src/core/model/model.spec.js +3012 -0
- package/src/core/on.spec.js +0 -7
- package/src/core/parse/interpreter.js +10 -7
- package/src/core/parse/parse.js +26 -5
- package/src/core/parse/parse.spec.js +95 -91
- package/src/core/prop.spec.js +4 -60
- package/src/core/sce/sce.spec.js +0 -8
- package/src/core/scope/scope.js +61 -30
- package/src/core/scope/scope.spec.js +25 -1960
- package/src/directive/aria/aria.js +3 -6
- package/src/directive/aria/aria.spec.js +0 -87
- package/src/directive/attrs/attrs.spec.js +0 -5
- package/src/directive/attrs/boolean.spec.js +0 -15
- package/src/directive/attrs/element-style.spec.js +0 -8
- package/src/directive/attrs/src.spec.js +0 -7
- package/src/directive/bind/bind.spec.js +0 -33
- package/src/directive/bind/bing-html.spec.js +0 -3
- package/src/{core/q/q.html → directive/channel/channel.html} +1 -1
- package/src/directive/channel/channel.js +29 -0
- package/src/directive/channel/channel.spec.js +52 -0
- package/src/directive/{list/list.test.js → channel/channel.test.js} +2 -4
- package/src/directive/class/class.js +3 -3
- package/src/directive/class/class.spec.js +9 -75
- package/src/directive/controller/controller.spec.js +0 -13
- package/src/directive/events/click.spec.js +0 -3
- package/src/directive/events/event.spec.js +0 -6
- package/src/directive/form/form.js +2 -3
- package/src/directive/form/form.spec.js +0 -65
- package/src/directive/if/if.spec.js +0 -4
- package/src/directive/include/include.spec.js +8 -59
- package/src/directive/init/init.js +6 -2
- package/src/directive/init/init.spec.js +0 -2
- package/src/directive/input/input.spec.js +0 -136
- package/src/directive/messages/messages.spec.js +4 -35
- package/src/directive/model/model.js +18 -25
- package/src/directive/model/model.spec.js +2 -49
- package/src/directive/model-options/model-options.spec.js +0 -6
- package/src/directive/non-bindable/non-bindable.spec.js +0 -1
- package/src/directive/observe/observe.js +0 -1
- package/src/directive/observe/observe.spec.js +0 -1
- package/src/directive/options/options.spec.js +0 -34
- package/src/directive/ref/href.spec.js +0 -15
- package/src/directive/repeat/repeat.spec.js +8 -135
- package/src/directive/script/script.spec.js +0 -2
- package/src/directive/select/select.js +3 -3
- package/src/directive/select/select.spec.js +0 -96
- package/src/directive/show-hide/show-hide.js +2 -2
- package/src/directive/show-hide/show-hide.spec.js +8 -19
- package/src/directive/style/style.spec.js +0 -7
- package/src/directive/switch/switch.spec.js +5 -5
- package/src/directive/validators/validators.spec.js +0 -1
- package/src/loader.js +0 -1
- package/src/public.js +75 -80
- package/src/router/common/coreservices.js +0 -2
- package/src/router/directives/state-directives.js +6 -14
- package/src/router/directives/state-directives.spec.js +0 -83
- package/src/router/directives/view-directive.js +4 -13
- package/src/router/directives/view-directive.spec.js +25 -71
- package/src/router/hooks/lazy-load.js +2 -2
- package/src/router/hooks/views.js +3 -5
- package/src/router/resolve/resolvable.js +3 -6
- package/src/router/resolve/resolve-context.js +2 -2
- package/src/router/state/state-service.js +4 -4
- package/src/router/state/state.spec.js +2 -5
- package/src/router/state/views.js +7 -10
- package/src/router/template-factory.js +3 -6
- package/src/router/template-factory.spec.js +0 -4
- package/src/router/transition/transition-hook.js +1 -1
- package/src/router/transition/transition.js +1 -1
- package/src/router/view-hook.spec.js +2 -2
- package/src/router/view-scroll.js +4 -6
- package/src/services/http/http.js +6 -9
- package/src/services/http/http.spec.js +30 -31
- package/src/services/http/template-request.spec.js +0 -10
- package/src/services/http-backend/http-backend.spec.js +3 -3
- package/src/services/template-request.js +2 -4
- package/src/shared/common.js +1 -2
- package/src/shared/jqlite/jqlite.js +0 -3
- package/types/core/cache/cache.d.ts +1 -1
- package/types/core/model/model.d.ts +204 -0
- package/types/core/parse/parse.d.ts +26 -0
- package/types/core/scope/scope.d.ts +22 -21
- package/types/directive/channel/channel.d.ts +11 -0
- package/src/core/interval/interval-factory.js +0 -50
- package/src/core/interval/interval.html +0 -18
- package/src/core/interval/interval.js +0 -77
- package/src/core/interval/interval.md +0 -123
- package/src/core/interval/interval.spec.js +0 -280
- package/src/core/q/q.js +0 -472
- package/src/core/q/q.md +0 -211
- package/src/core/q/q.spec.js +0 -2748
- package/src/core/q/q.test.js +0 -12
- package/src/core/scope/scope.test.js +0 -12
- package/src/core/timeout/timeout.html +0 -18
- package/src/core/timeout/timeout.js +0 -109
- package/src/core/timeout/timeout.spec.js +0 -354
- package/src/core/timeout/timout.test.js +0 -12
- package/src/directive/list/list.html +0 -18
- package/src/directive/list/list.js +0 -46
- package/src/directive/list/list.md +0 -22
- package/src/directive/list/list.spec.js +0 -172
- package/types/directive/list/list.d.ts +0 -4
|
@@ -5,7 +5,7 @@ const TEST_URL = "src/core/compile/compile.html?random=false";
|
|
|
5
5
|
test("unit tests contain no errors", async ({ page }) => {
|
|
6
6
|
await page.goto(TEST_URL);
|
|
7
7
|
await page.content();
|
|
8
|
-
await page.waitForTimeout(
|
|
8
|
+
await page.waitForTimeout(4000);
|
|
9
9
|
await expect(page.locator(".jasmine-overall-result")).toHaveText(
|
|
10
10
|
/0 failures/,
|
|
11
11
|
);
|
|
@@ -112,6 +112,7 @@ export class ControllerProvider {
|
|
|
112
112
|
instance = Object.create(controllerPrototype || null);
|
|
113
113
|
|
|
114
114
|
if (identifier) {
|
|
115
|
+
instance["$controllerIdentifier"] = identifier;
|
|
115
116
|
this.addIdentifier(
|
|
116
117
|
locals,
|
|
117
118
|
identifier,
|
|
@@ -134,6 +135,7 @@ export class ControllerProvider {
|
|
|
134
135
|
) {
|
|
135
136
|
instance = result;
|
|
136
137
|
if (identifier) {
|
|
138
|
+
instance["$controllerIdentifier"] = identifier;
|
|
137
139
|
this.addIdentifier(
|
|
138
140
|
locals,
|
|
139
141
|
identifier,
|
package/src/core/di/injector.md
CHANGED
|
@@ -1410,7 +1410,6 @@ describe("directive", () => {
|
|
|
1410
1410
|
injector.loadNewModules(["a"]);
|
|
1411
1411
|
injector.invoke(($compile, $rootScope) => {
|
|
1412
1412
|
const elem = $compile("<div a-directive></div>")($rootScope); // compile and link
|
|
1413
|
-
$rootScope.$digest();
|
|
1414
1413
|
expect(elem.text()).toEqual("test directive");
|
|
1415
1414
|
elem.remove();
|
|
1416
1415
|
});
|
|
@@ -1424,7 +1423,6 @@ describe("directive", () => {
|
|
|
1424
1423
|
injector.loadNewModules(["a"]);
|
|
1425
1424
|
injector.invoke(($compile, $rootScope) => {
|
|
1426
1425
|
const elem = $compile("<div a-directive></div>")($rootScope); // compile and link
|
|
1427
|
-
$rootScope.$digest();
|
|
1428
1426
|
expect(elem.text()).toEqual("test directive");
|
|
1429
1427
|
elem.remove();
|
|
1430
1428
|
});
|
|
@@ -114,7 +114,8 @@ class AbstractInjector {
|
|
|
114
114
|
|
|
115
115
|
if (isClass(/** @type {string} */ (fn))) {
|
|
116
116
|
args.unshift(null);
|
|
117
|
-
|
|
117
|
+
const res = new (Function.prototype.bind.apply(fn, args))();
|
|
118
|
+
return res;
|
|
118
119
|
} else {
|
|
119
120
|
return /** @type {Function} */ (fn).apply(self, args);
|
|
120
121
|
}
|
|
@@ -332,13 +332,25 @@ export class InterpolateProvider {
|
|
|
332
332
|
};
|
|
333
333
|
|
|
334
334
|
return extend(
|
|
335
|
-
(context) => {
|
|
335
|
+
(context, cb) => {
|
|
336
336
|
let i = 0;
|
|
337
337
|
const ii = expressions.length;
|
|
338
338
|
const values = new Array(ii);
|
|
339
|
-
|
|
340
339
|
try {
|
|
341
340
|
for (; i < ii; i++) {
|
|
341
|
+
if (cb) {
|
|
342
|
+
const watchProp = expressions[i].trim();
|
|
343
|
+
console.log(watchProp);
|
|
344
|
+
context.$watch(watchProp, () => {
|
|
345
|
+
let vals = new Array(ii);
|
|
346
|
+
let j = 0;
|
|
347
|
+
for (; j < ii; j++) {
|
|
348
|
+
vals[j] = parseFns[j](context);
|
|
349
|
+
}
|
|
350
|
+
cb(compute(vals));
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
|
|
342
354
|
values[i] = parseFns[i](context);
|
|
343
355
|
}
|
|
344
356
|
|
|
@@ -348,12 +360,13 @@ export class InterpolateProvider {
|
|
|
348
360
|
}
|
|
349
361
|
},
|
|
350
362
|
{
|
|
363
|
+
// Most likely we would need to register watches during interpolation
|
|
351
364
|
// all of these properties are undocumented for now
|
|
352
365
|
exp: text, // just for compatibility with regular watchers created via $watch
|
|
353
366
|
expressions,
|
|
354
367
|
$$watchDelegate(scope, listener) {
|
|
355
368
|
let lastValue;
|
|
356
|
-
return scope.$
|
|
369
|
+
return scope.$watch(
|
|
357
370
|
parseFns,
|
|
358
371
|
function interpolateFnWatcher(values, oldValues) {
|
|
359
372
|
const currValue = compute(values);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createInjector } from "../di/injector";
|
|
2
2
|
import { Angular } from "../../loader";
|
|
3
|
+
import { wait } from "../../shared/test-utils";
|
|
3
4
|
|
|
4
5
|
describe("$interpolate", () => {
|
|
5
6
|
let $interpolate, $injector, $rootScope, $sce;
|
|
@@ -234,18 +235,22 @@ describe("$interpolate", () => {
|
|
|
234
235
|
expect(calls.pop()).toBeUndefined();
|
|
235
236
|
});
|
|
236
237
|
|
|
237
|
-
|
|
238
|
+
// TODO these tests shoudl be revereds
|
|
239
|
+
// Calling interpolation with scope should CREATE watches on scope
|
|
240
|
+
it("should stop watching strings with no expressions after first execution", async () => {
|
|
238
241
|
const spy = jasmine.createSpy();
|
|
239
|
-
$rootScope.$watch($interpolate("foo"), spy);
|
|
240
|
-
$rootScope
|
|
241
|
-
|
|
242
|
+
$rootScope.$watch($interpolate("foo")(), spy);
|
|
243
|
+
$rootScope.foo = "foo";
|
|
244
|
+
await wait();
|
|
245
|
+
expect(spy).toHaveBeenCalledWith("foo", undefined, $rootScope);
|
|
242
246
|
expect(spy).toHaveBeenCalledTimes(1);
|
|
243
247
|
});
|
|
244
248
|
|
|
245
249
|
it("should stop watching strings with only constant expressions after first execution", () => {
|
|
246
250
|
const spy = jasmine.createSpy();
|
|
247
|
-
$
|
|
248
|
-
$rootScope.$
|
|
251
|
+
let res = $interpolate("foo {{42}}")($rootScope);
|
|
252
|
+
$rootScope.$watch(res, spy);
|
|
253
|
+
|
|
249
254
|
expect(spy).toHaveBeenCalledWith("foo 42", "foo 42", $rootScope);
|
|
250
255
|
expect(spy).toHaveBeenCalledTimes(1);
|
|
251
256
|
});
|
|
@@ -264,18 +269,12 @@ describe("$interpolate", () => {
|
|
|
264
269
|
expect(interp.$$watchDelegate).toBeDefined();
|
|
265
270
|
});
|
|
266
271
|
|
|
267
|
-
it("correctly returns new
|
|
272
|
+
it("correctly returns new value", async () => {
|
|
268
273
|
const interp = $interpolate("{{expr}}");
|
|
269
|
-
|
|
270
|
-
$rootScope.$watch(interp, listenerSpy);
|
|
274
|
+
$rootScope.$watch("expr", () => {});
|
|
271
275
|
$rootScope.expr = 42;
|
|
272
|
-
|
|
273
|
-
expect(
|
|
274
|
-
expect(listenerSpy.calls.mostRecent().args[1]).toEqual("42");
|
|
275
|
-
$rootScope.expr++;
|
|
276
|
-
$rootScope.$apply();
|
|
277
|
-
expect(listenerSpy.calls.mostRecent().args[0]).toEqual("43");
|
|
278
|
-
expect(listenerSpy.calls.mostRecent().args[1]).toEqual("42");
|
|
276
|
+
await wait();
|
|
277
|
+
expect(interp($rootScope)).toEqual("42");
|
|
279
278
|
});
|
|
280
279
|
|
|
281
280
|
it("should support escaping interpolation signs", () => {
|
|
@@ -399,6 +398,61 @@ describe("$interpolate", () => {
|
|
|
399
398
|
});
|
|
400
399
|
});
|
|
401
400
|
|
|
401
|
+
describe("interpolation callbacks", () => {
|
|
402
|
+
it("does not require a callback", async () => {
|
|
403
|
+
let text;
|
|
404
|
+
$rootScope.expr = 42;
|
|
405
|
+
const interp = $interpolate("{{expr}}");
|
|
406
|
+
|
|
407
|
+
text = interp($rootScope);
|
|
408
|
+
|
|
409
|
+
expect(text).toEqual("42");
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
it("correctly invokes callback when interpolated value changes", async () => {
|
|
413
|
+
let counter = 0;
|
|
414
|
+
|
|
415
|
+
const interp = $interpolate("{{expr}}");
|
|
416
|
+
|
|
417
|
+
interp($rootScope, (val) => {
|
|
418
|
+
counter++;
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
$rootScope.expr = 42;
|
|
422
|
+
await wait();
|
|
423
|
+
expect(counter).toEqual(1);
|
|
424
|
+
|
|
425
|
+
$rootScope.expr++;
|
|
426
|
+
await wait();
|
|
427
|
+
expect(counter).toEqual(2);
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
it("returns currently interpolated text", async () => {
|
|
431
|
+
let text;
|
|
432
|
+
$rootScope.expr = 42;
|
|
433
|
+
const interp = $interpolate("{{expr}}");
|
|
434
|
+
|
|
435
|
+
text = interp($rootScope, (val) => {
|
|
436
|
+
text = val;
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
expect(text).toEqual("42");
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
it("invokes callback with newly interpolated text", async () => {
|
|
443
|
+
let text;
|
|
444
|
+
const interp = $interpolate("{{expr}}");
|
|
445
|
+
|
|
446
|
+
interp($rootScope, (val) => {
|
|
447
|
+
text = val;
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
$rootScope.expr = 42;
|
|
451
|
+
await wait();
|
|
452
|
+
expect(text).toEqual("42");
|
|
453
|
+
});
|
|
454
|
+
});
|
|
455
|
+
|
|
402
456
|
describe("interpolating in a trusted context", () => {
|
|
403
457
|
let sce;
|
|
404
458
|
|
|
@@ -5,7 +5,7 @@ const TEST_URL = "src/core/interval/interval.html";
|
|
|
5
5
|
test("unit tests contain no errors", async ({ page }) => {
|
|
6
6
|
await page.goto(TEST_URL);
|
|
7
7
|
await page.content();
|
|
8
|
-
await page.waitForTimeout(
|
|
8
|
+
await page.waitForTimeout(100);
|
|
9
9
|
await expect(page.locator(".jasmine-overall-result")).toHaveText(
|
|
10
10
|
/0 failures/,
|
|
11
11
|
);
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
toInt,
|
|
14
14
|
toKeyValue,
|
|
15
15
|
} from "../../shared/utils";
|
|
16
|
-
import { ScopePhase } from "../scope/scope";
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
18
|
* @typedef {Object} DefaultPorts
|
|
@@ -768,7 +767,6 @@ export function LocationProvider() {
|
|
|
768
767
|
afterLocationChange(oldUrl, oldState);
|
|
769
768
|
}
|
|
770
769
|
});
|
|
771
|
-
if ($rootScope.$$phase === ScopePhase.NONE) $rootScope.$digest();
|
|
772
770
|
});
|
|
773
771
|
|
|
774
772
|
// update browser
|
|
@@ -785,7 +785,7 @@ describe("$location", () => {
|
|
|
785
785
|
// $browser,
|
|
786
786
|
// "url",
|
|
787
787
|
// ).and.callThrough();
|
|
788
|
-
//
|
|
788
|
+
// ;
|
|
789
789
|
// expect($browserUrl).not.toHaveBeenCalled();
|
|
790
790
|
// });
|
|
791
791
|
// });
|
|
@@ -815,7 +815,7 @@ describe("$location", () => {
|
|
|
815
815
|
// }
|
|
816
816
|
// });
|
|
817
817
|
// expect($browser.url()).toEqual("http://server/base/#!/home");
|
|
818
|
-
//
|
|
818
|
+
// ;
|
|
819
819
|
// expect(handlerCalled).toEqual(true);
|
|
820
820
|
// expect($browser.url()).toEqual("http://server/base/#!/");
|
|
821
821
|
// });
|
|
@@ -829,7 +829,7 @@ describe("$location", () => {
|
|
|
829
829
|
// });
|
|
830
830
|
// inject(($location, $browser, $rootScope) => {
|
|
831
831
|
// expect(() => {
|
|
832
|
-
//
|
|
832
|
+
// ;
|
|
833
833
|
// }).not.toThrow();
|
|
834
834
|
// });
|
|
835
835
|
// });
|
|
@@ -843,7 +843,7 @@ describe("$location", () => {
|
|
|
843
843
|
// });
|
|
844
844
|
// inject(($location, $browser, $rootScope) => {
|
|
845
845
|
// expect(() => {
|
|
846
|
-
//
|
|
846
|
+
// ;
|
|
847
847
|
// }).not.toThrow();
|
|
848
848
|
// });
|
|
849
849
|
// });
|
|
@@ -857,7 +857,7 @@ describe("$location", () => {
|
|
|
857
857
|
// });
|
|
858
858
|
// inject(($location, $browser, $rootScope) => {
|
|
859
859
|
// expect(() => {
|
|
860
|
-
//
|
|
860
|
+
// ;
|
|
861
861
|
// }).not.toThrow();
|
|
862
862
|
// });
|
|
863
863
|
// });
|
|
@@ -867,10 +867,10 @@ describe("$location", () => {
|
|
|
867
867
|
// initService({ html5Mode: true, supportHistory: true });
|
|
868
868
|
// mockUpBrowser({ initialUrl: "http://localhost:9876/", baseHref: "/" });
|
|
869
869
|
// inject(($location, $browser, $rootScope) => {
|
|
870
|
-
//
|
|
870
|
+
// ;
|
|
871
871
|
// $browser.url("http://localhost:9876/?q='");
|
|
872
872
|
// expect(() => {
|
|
873
|
-
//
|
|
873
|
+
// ;
|
|
874
874
|
// }).not.toThrow();
|
|
875
875
|
// });
|
|
876
876
|
// });
|
|
@@ -880,7 +880,7 @@ describe("$location", () => {
|
|
|
880
880
|
// initService({ html5Mode: true, supportHistory: true });
|
|
881
881
|
// mockUpBrowser({ initialUrl: "http://localhost:9876/", baseHref: "/" });
|
|
882
882
|
// inject(($window, $location, $browser, $rootScope) => {
|
|
883
|
-
//
|
|
883
|
+
// ;
|
|
884
884
|
// $window.location.href = "http://localhost:9876/?q='";
|
|
885
885
|
// expect(() => {
|
|
886
886
|
// JQLite($window).triggerHandler("popstate");
|
|
@@ -901,7 +901,7 @@ describe("$location", () => {
|
|
|
901
901
|
// $window,
|
|
902
902
|
// ) => {
|
|
903
903
|
// $location.url("baz");
|
|
904
|
-
//
|
|
904
|
+
// ;
|
|
905
905
|
|
|
906
906
|
// const originalUrl = $window.location.href;
|
|
907
907
|
|
|
@@ -931,7 +931,7 @@ describe("$location", () => {
|
|
|
931
931
|
// $window,
|
|
932
932
|
// ) => {
|
|
933
933
|
// $location.url("baz");
|
|
934
|
-
//
|
|
934
|
+
// ;
|
|
935
935
|
|
|
936
936
|
// $rootScope.$apply(() => {
|
|
937
937
|
// $rootScope.$evalAsync(() => {
|
|
@@ -969,7 +969,7 @@ describe("$location", () => {
|
|
|
969
969
|
|
|
970
970
|
// updatePathOnLocationChangeSuccessTo("/Home");
|
|
971
971
|
|
|
972
|
-
//
|
|
972
|
+
// ;
|
|
973
973
|
|
|
974
974
|
// expect($browser.url()).toEqual("http://server/app/#!/Home");
|
|
975
975
|
// expect($location.path()).toEqual("/Home");
|
|
@@ -991,7 +991,7 @@ describe("$location", () => {
|
|
|
991
991
|
|
|
992
992
|
// updatePathOnLocationChangeSuccessTo("/");
|
|
993
993
|
|
|
994
|
-
//
|
|
994
|
+
// ;
|
|
995
995
|
|
|
996
996
|
// expect($browser.url()).toEqual("http://server/app/#!/");
|
|
997
997
|
// expect($location.path()).toEqual("/");
|
|
@@ -1014,7 +1014,7 @@ describe("$location", () => {
|
|
|
1014
1014
|
// ).and.callThrough();
|
|
1015
1015
|
|
|
1016
1016
|
// updatePathOnLocationChangeSuccessTo("/Home");
|
|
1017
|
-
//
|
|
1017
|
+
// ;
|
|
1018
1018
|
|
|
1019
1019
|
// expect($browser.url()).toEqual("http://server/app/#!/Home");
|
|
1020
1020
|
// expect($location.path()).toEqual("/Home");
|
|
@@ -1037,7 +1037,7 @@ describe("$location", () => {
|
|
|
1037
1037
|
// ).and.callThrough();
|
|
1038
1038
|
|
|
1039
1039
|
// updatePathOnLocationChangeSuccessTo("/");
|
|
1040
|
-
//
|
|
1040
|
+
// ;
|
|
1041
1041
|
|
|
1042
1042
|
// expect($browser.url()).toEqual("http://server/app/#!/");
|
|
1043
1043
|
// expect($location.path()).toEqual("/");
|
|
@@ -1059,7 +1059,7 @@ describe("$location", () => {
|
|
|
1059
1059
|
// const $location = $injector.get("$location");
|
|
1060
1060
|
// updatePathOnLocationChangeSuccessTo("/Home");
|
|
1061
1061
|
|
|
1062
|
-
//
|
|
1062
|
+
// ;
|
|
1063
1063
|
|
|
1064
1064
|
// expect($browser.url()).toEqual("http://server/app/Home");
|
|
1065
1065
|
// expect($location.path()).toEqual("/Home");
|
|
@@ -1079,7 +1079,7 @@ describe("$location", () => {
|
|
|
1079
1079
|
// const $location = $injector.get("$location");
|
|
1080
1080
|
// updatePathOnLocationChangeSuccessTo("/");
|
|
1081
1081
|
|
|
1082
|
-
//
|
|
1082
|
+
// ;
|
|
1083
1083
|
|
|
1084
1084
|
// expect($browser.url()).toEqual("http://server/app/");
|
|
1085
1085
|
// expect($location.path()).toEqual("/");
|
|
@@ -1099,7 +1099,7 @@ describe("$location", () => {
|
|
|
1099
1099
|
// const $location = $injector.get("$location");
|
|
1100
1100
|
// updatePathOnLocationChangeSuccessTo("/Home");
|
|
1101
1101
|
|
|
1102
|
-
//
|
|
1102
|
+
// ;
|
|
1103
1103
|
|
|
1104
1104
|
// expect($browser.url()).toEqual("http://server/app/Home");
|
|
1105
1105
|
// expect($location.path()).toEqual("/Home");
|
|
@@ -1119,7 +1119,7 @@ describe("$location", () => {
|
|
|
1119
1119
|
// const $location = $injector.get("$location");
|
|
1120
1120
|
// updatePathOnLocationChangeSuccessTo("/");
|
|
1121
1121
|
|
|
1122
|
-
//
|
|
1122
|
+
// ;
|
|
1123
1123
|
|
|
1124
1124
|
// expect($browser.url()).toEqual("http://server/app/");
|
|
1125
1125
|
// expect($location.path()).toEqual("/");
|
|
@@ -1140,7 +1140,7 @@ describe("$location", () => {
|
|
|
1140
1140
|
// const $location = $injector.get("$location");
|
|
1141
1141
|
// updatePathOnLocationChangeSuccessTo("/", { q: "'" });
|
|
1142
1142
|
|
|
1143
|
-
//
|
|
1143
|
+
// ;
|
|
1144
1144
|
|
|
1145
1145
|
// expect($location.path()).toEqual("/");
|
|
1146
1146
|
// expect($location.search()).toEqual({ q: "'" });
|
|
@@ -1200,7 +1200,7 @@ describe("$location", () => {
|
|
|
1200
1200
|
// }
|
|
1201
1201
|
// });
|
|
1202
1202
|
|
|
1203
|
-
//
|
|
1203
|
+
// ;
|
|
1204
1204
|
// expect($location.absUrl()).toBe(NEW_URL);
|
|
1205
1205
|
// });
|
|
1206
1206
|
// });
|
|
@@ -1299,7 +1299,7 @@ describe("$location", () => {
|
|
|
1299
1299
|
// },
|
|
1300
1300
|
// );
|
|
1301
1301
|
|
|
1302
|
-
//
|
|
1302
|
+
// ;
|
|
1303
1303
|
// expect($browser.url()).toBe("http://new.com/a/b#!/changed");
|
|
1304
1304
|
// });
|
|
1305
1305
|
// });
|
|
@@ -1310,7 +1310,7 @@ describe("$location", () => {
|
|
|
1310
1310
|
// inject(($rootScope, $browser, $location) => {
|
|
1311
1311
|
// $location.hash("test");
|
|
1312
1312
|
|
|
1313
|
-
//
|
|
1313
|
+
// ;
|
|
1314
1314
|
// expect($browser.url()).toBe("http://new.com/a/b##test");
|
|
1315
1315
|
// });
|
|
1316
1316
|
// });
|
|
@@ -1334,7 +1334,7 @@ describe("$location", () => {
|
|
|
1334
1334
|
// mockUpBrowser({ initialUrl: "http://new.com/a/b/", baseHref: "/a/b/" });
|
|
1335
1335
|
// inject(($location, $rootScope, $window) => {
|
|
1336
1336
|
// $window.history.pushState({ b: 3 });
|
|
1337
|
-
//
|
|
1337
|
+
// ;
|
|
1338
1338
|
|
|
1339
1339
|
// expect($location.state()).toEqual({ b: 3 });
|
|
1340
1340
|
|
|
@@ -1343,7 +1343,7 @@ describe("$location", () => {
|
|
|
1343
1343
|
// null,
|
|
1344
1344
|
// `${$window.location.href}c?d=e#f`,
|
|
1345
1345
|
// );
|
|
1346
|
-
//
|
|
1346
|
+
// ;
|
|
1347
1347
|
|
|
1348
1348
|
// expect($location.path()).toBe("/c");
|
|
1349
1349
|
// expect($location.search()).toEqual({ d: "e" });
|
|
@@ -1358,10 +1358,10 @@ describe("$location", () => {
|
|
|
1358
1358
|
// mockUpBrowser({ initialUrl: "http://server/app/", baseHref: "/app/" });
|
|
1359
1359
|
// inject(($rootScope, $injector, $window) => {
|
|
1360
1360
|
// const $location = $injector.get("$location");
|
|
1361
|
-
//
|
|
1361
|
+
// ; // allow $location initialization to finish
|
|
1362
1362
|
|
|
1363
1363
|
// $window.history.pushState({}, null, "http://server/app/Home?q='");
|
|
1364
|
-
//
|
|
1364
|
+
// ;
|
|
1365
1365
|
|
|
1366
1366
|
// expect($location.absUrl()).toEqual("http://server/app/Home?q='");
|
|
1367
1367
|
// expect($location.path()).toEqual("/Home");
|
|
@@ -1375,7 +1375,7 @@ describe("$location", () => {
|
|
|
1375
1375
|
// mockUpBrowser({ initialUrl: "http://server/app/", baseHref: "/app/" });
|
|
1376
1376
|
// inject(($rootScope, $injector, $window) => {
|
|
1377
1377
|
// const $location = $injector.get("$location");
|
|
1378
|
-
//
|
|
1378
|
+
// ; // allow $location initialization to finish
|
|
1379
1379
|
|
|
1380
1380
|
// $window.location.href = "http://server/app/Home?q='";
|
|
1381
1381
|
// JQLite($window).triggerHandler("popstate");
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
|
|
11
11
|
<script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
|
|
12
12
|
<script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
|
|
13
|
-
<script type="module" src="/src/core/
|
|
13
|
+
<script type="module" src="/src/core/model/model.spec.js"></script>
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
16
16
|
<div id="dummy"></div>
|