- Notifications
You must be signed in to change notification settings - Fork26.4k
Commit73a7685
committed
feat(core): Remove
This change updates the internals to provide zoneless scheduling bydefault when ZoneJS. This change means that for most applications,simply omitting the ZoneJS polyfill will be enough to use zonelesschange detection.Developers may still need to use `provideZonelessChangeDetection` in the providers if the applicationexists alongside another one that uses ZoneJS (because ZoneJS would thenbe present and the zone-based change detection scheduler would then beselected).This is one step towards zoneless by default, but does not yet go as faras removing the `provideZoneChangeDetection` from the internals. Thatwould/will be larger breaking change since it will require existingZone-based applications to manually include `provideZoneChangeDetection`to the application providers (and for all tests).This approach works well because all existing Zone-based applications_must_ have ZoneJS already included on the page for them to work. Inaddition, this does not affect existing zoneless applications becausethey all must already manually use `provideZonelessChangeDetection`since the only scheduler provided by default prior to this change wasthe zone-based one. Only "custom" zoneless (zoneless apps prior to realzoneless support) may be affected.BREAKING CHANGE: Applications that configure a custom zoneless implementationnow and _do not_ want the Angular zoneless scheduler to be enabled willneed to include `provideZoneChangeDetection` as well as a providerfor `NgZone` in the application providers:```bootstrapApplication(App, {providers: [ provideZoneChangeDetection(), {provide: NgZone, useClass: MyNoopNgZone}]});```provideZonelessChangeDetection
requirement when ZoneJS is not present1 parent4574095 commit73a7685
File tree
14 files changed
+79
-47
lines changed- packages
- core
- src
- application
- change_detection/scheduling
- platform
- testing/src
- test/bundling
- animations-standalone
- defer
- forms_reactive
- forms_template_driven
- hydration
- router
- standalone_bootstrap
- platform-browser/testing/src
14 files changed
+79
-47
lines changedLines changed: 2 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
10 | 9 |
| |
11 | 10 |
| |
12 | 11 |
| |
| |||
15 | 14 |
| |
16 | 15 |
| |
17 | 16 |
| |
18 |
| - | |
19 |
| - | |
20 | 17 |
| |
21 | 18 |
| |
22 | 19 |
| |
23 | 20 |
| |
| 21 | + | |
24 | 22 |
| |
25 | 23 |
| |
26 | 24 |
| |
| |||
52 | 50 |
| |
53 | 51 |
| |
54 | 52 |
| |
55 |
| - | |
56 |
| - | |
| 53 | + | |
57 | 54 |
| |
58 | 55 |
| |
59 | 56 |
| |
|
Lines changed: 40 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + |
Lines changed: 10 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| |||
386 | 386 |
| |
387 | 387 |
| |
388 | 388 |
| |
389 |
| - | |
390 |
| - | |
391 |
| - | |
392 |
| - | |
| 389 | + | |
393 | 390 |
| |
394 | 391 |
| |
395 | 392 |
| |
396 | 393 |
| |
397 | 394 |
| |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + |
Lines changed: 2 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
44 |
| - | |
| 40 | + | |
| 41 | + | |
45 | 42 |
| |
46 | 43 |
| |
47 | 44 |
| |
|
Lines changed: 2 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
12 |
| - | |
13 |
| - | |
14 |
| - | |
15 |
| - | |
16 |
| - | |
| 11 | + | |
17 | 12 |
| |
18 | 13 |
| |
19 | 14 |
| |
20 | 15 |
| |
21 | 16 |
| |
22 | 17 |
| |
23 | 18 |
| |
24 |
| - | |
25 | 19 |
| |
26 | 20 |
| |
27 | 21 |
| |
| |||
53 | 47 |
| |
54 | 48 |
| |
55 | 49 |
| |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
66 | 50 |
| |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
| 51 | + | |
72 | 52 |
| |
73 | 53 |
| |
74 | 54 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
524 | 524 |
| |
525 | 525 |
| |
526 | 526 |
| |
| 527 | + | |
527 | 528 |
| |
528 | 529 |
| |
529 | 530 |
| |
| |||
591 | 592 |
| |
592 | 593 |
| |
593 | 594 |
| |
| 595 | + | |
594 | 596 |
| |
595 | 597 |
| |
596 | 598 |
| |
| |||
747 | 749 |
| |
748 | 750 |
| |
749 | 751 |
| |
| 752 | + | |
750 | 753 |
| |
751 | 754 |
| |
752 | 755 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
474 | 474 |
| |
475 | 475 |
| |
476 | 476 |
| |
| 477 | + | |
477 | 478 |
| |
478 | 479 |
| |
479 | 480 |
| |
| |||
543 | 544 |
| |
544 | 545 |
| |
545 | 546 |
| |
| 547 | + | |
546 | 548 |
| |
547 | 549 |
| |
548 | 550 |
| |
| |||
649 | 651 |
| |
650 | 652 |
| |
651 | 653 |
| |
| 654 | + | |
652 | 655 |
| |
653 | 656 |
| |
654 | 657 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
693 | 693 |
| |
694 | 694 |
| |
695 | 695 |
| |
| 696 | + | |
696 | 697 |
| |
697 | 698 |
| |
698 | 699 |
| |
| |||
875 | 876 |
| |
876 | 877 |
| |
877 | 878 |
| |
| 879 | + | |
878 | 880 |
| |
879 | 881 |
| |
880 | 882 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
695 | 695 |
| |
696 | 696 |
| |
697 | 697 |
| |
| 698 | + | |
698 | 699 |
| |
699 | 700 |
| |
700 | 701 |
| |
| |||
874 | 875 |
| |
875 | 876 |
| |
876 | 877 |
| |
| 878 | + | |
877 | 879 |
| |
878 | 880 |
| |
879 | 881 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
492 | 492 |
| |
493 | 493 |
| |
494 | 494 |
| |
| 495 | + | |
495 | 496 |
| |
496 | 497 |
| |
497 | 498 |
| |
| |||
563 | 564 |
| |
564 | 565 |
| |
565 | 566 |
| |
| 567 | + | |
566 | 568 |
| |
567 | 569 |
| |
568 | 570 |
| |
| |||
688 | 690 |
| |
689 | 691 |
| |
690 | 692 |
| |
| 693 | + | |
691 | 694 |
| |
692 | 695 |
| |
693 | 696 |
| |
|
0 commit comments
Comments
(0)