mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
Compare commits
154 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7cb3b78acc | |||
| 3797d1022d | |||
| 929788d9a8 | |||
| e9bd16adbe | |||
| 95248a0bab | |||
| 626f3f230b | |||
| cab81ba13a | |||
| 617610e3b0 | |||
| 14eb6c4fab | |||
| f9ca4d8499 | |||
| af0a152a2c | |||
| e0bea36acf | |||
| 44ff4fbceb | |||
| 7c49b4148e | |||
| 8234564bff | |||
| 5e4038eb63 | |||
| ba5fe3f531 | |||
| 71449b1dae | |||
| ec95631ceb | |||
| 74037f165c | |||
| 07d97af1e8 | |||
| d613571154 | |||
| d1762c78af | |||
| 92784cafab | |||
| 60fb27f12d | |||
| 59eef29a6c | |||
| 1e918b6f31 | |||
| 69b00a097a | |||
| fb7900b9eb | |||
| 7b38c85aeb | |||
| 7dfa44e71a | |||
| f8e7f60edf | |||
| a3082fbba7 | |||
| fe02841b63 | |||
| 08049fa23f | |||
| c375e5d22f | |||
| c0a33412b4 | |||
| 3512eb6cd3 | |||
| 7f2f992360 | |||
| abc217b28e | |||
| 919f8ae4e8 | |||
| 63c8e56a3a | |||
| 4de2b6d836 | |||
| 964a696fc2 | |||
| 1c8aecbf48 | |||
| 1028a4eb6c | |||
| d252cffc61 | |||
| 245365957a | |||
| c4fbd85acf | |||
| 57d5f9529d | |||
| 2913b4c58b | |||
| 6c15170eb9 | |||
| a26afce68c | |||
| d13e054950 | |||
| 9b19ba0b85 | |||
| c9eef5e969 | |||
| 3b7fe8ba7d | |||
| 5017bf92fe | |||
| c0d3fbeff0 | |||
| 7130bffbbd | |||
| 8b2536e5e0 | |||
| 9b9042c8d1 | |||
| 98592b03bd | |||
| 7dc6802db9 | |||
| 6279e0a239 | |||
| d908761f1f | |||
| b734ceb3dc | |||
| cefe9f0f2e | |||
| 5fa2c88134 | |||
| 7b78256d6d | |||
| 0daa9bfd26 | |||
| 426b6f9472 | |||
| 6c5d73e3e4 | |||
| 0ac4c0b406 | |||
| 07b8e56e11 | |||
| 5f78f55f0d | |||
| 4688a180f4 | |||
| d7faf223e6 | |||
| 6f70524495 | |||
| 94f34e028e | |||
| db480829d4 | |||
| 9ef9b88cfd | |||
| bbc368c9e8 | |||
| 5fdc660537 | |||
| 4f40266b21 | |||
| c359381dc3 | |||
| 63c5a18b89 | |||
| 9103b74ec0 | |||
| 75f7864dc7 | |||
| 59cd255dde | |||
| 9c76560858 | |||
| db768911c0 | |||
| a6d12ef667 | |||
| 25aef6281a | |||
| 55209e5a37 | |||
| 0be1a82d91 | |||
| d389bb8de6 | |||
| 77562f9235 | |||
| 46c6f2052c | |||
| 4765bf1c7a | |||
| ef0d161d3a | |||
| b04e9a684b | |||
| 97f27d7ea3 | |||
| 16bc023389 | |||
| 158c9d6803 | |||
| acb95f5219 | |||
| a1ca376cab | |||
| 6ca075d2bd | |||
| f5addee488 | |||
| 5ca7068173 | |||
| 845038c28f | |||
| f9e18b7ae1 | |||
| 00cc0d937b | |||
| d619783a55 | |||
| 70a2051e95 | |||
| 40dc07223a | |||
| 2469b88af2 | |||
| e6beeab7dd | |||
| beb18286aa | |||
| 0115e2b664 | |||
| c2ed1ae945 | |||
| bce108ab49 | |||
| 240edcbc4e | |||
| 11187ef433 | |||
| 9165191a13 | |||
| 17ac7c6624 | |||
| c195bd0b24 | |||
| 4a1cdbafc6 | |||
| f6f7a375a8 | |||
| 199f7a2ba9 | |||
| 998c1e63fe | |||
| 1a25e381e6 | |||
| 48e692dabe | |||
| 5ef03852c8 | |||
| 716f473d29 | |||
| 524e5152d7 | |||
| bb1d4ff315 | |||
| d8b6adb7bc | |||
| f4fcdffbac | |||
| a0316ab0c0 | |||
| 6c0ac5145b | |||
| a8e5a93e12 | |||
| 266b62c20f | |||
| a0e68250ad | |||
| d7a9b36d91 | |||
| 5bdf321a97 | |||
| b11d3c3759 | |||
| 0c35e67ee7 | |||
| 0e2c357358 | |||
| 22d8e5668e | |||
| 6fb733fb40 | |||
| 6992a68935 | |||
| 7e39556013 | |||
| 08694e34dd |
+1
-1
@@ -1 +1 @@
|
||||
4.0.0
|
||||
4.2.2
|
||||
|
||||
@@ -786,9 +786,10 @@ workflows:
|
||||
# since the publishing script expects the legacy outputs layout.
|
||||
- build-npm-packages
|
||||
- legacy-unit-tests-saucelabs
|
||||
- components-repo-unit-tests:
|
||||
requires:
|
||||
- build-npm-packages
|
||||
# TODO(devversion): re-enable once the components repo has accounted for the `ng_module` devmode target changes.
|
||||
#- components-repo-unit-tests:
|
||||
# requires:
|
||||
# - build-npm-packages
|
||||
- test_zonejs:
|
||||
requires:
|
||||
- setup
|
||||
|
||||
@@ -9,6 +9,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: angular/dev-infra/github-actions/commit-message-based-labels@c2fb49a44ad9fa77f508010f950524ee97f5e8d5
|
||||
- uses: angular/dev-infra/github-actions/commit-message-based-labels@744a864cfd77bfe280ac9337041a512cca2daaf9
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
|
||||
@@ -10,6 +10,6 @@ jobs:
|
||||
if: github.repository == 'angular/angular'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: angular/dev-infra/github-actions/feature-request@c2fb49a44ad9fa77f508010f950524ee97f5e8d5
|
||||
- uses: angular/dev-infra/github-actions/feature-request@744a864cfd77bfe280ac9337041a512cca2daaf9
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
|
||||
@@ -10,6 +10,6 @@ jobs:
|
||||
if: github.repository == 'angular/angular'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: angular/dev-infra/github-actions/lock-closed@c2fb49a44ad9fa77f508010f950524ee97f5e8d5
|
||||
- uses: angular/dev-infra/github-actions/lock-closed@744a864cfd77bfe280ac9337041a512cca2daaf9
|
||||
with:
|
||||
lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }}
|
||||
|
||||
+17
-16
@@ -4,23 +4,24 @@ import {join} from 'path';
|
||||
/** Configuration for the `ng-dev release` command. */
|
||||
export const release: ReleaseConfig = {
|
||||
publishRegistry: 'https://wombat-dressing-room.appspot.com',
|
||||
representativeNpmPackage: '@angular/core',
|
||||
npmPackages: [
|
||||
'@angular/animations',
|
||||
'@angular/bazel',
|
||||
'@angular/common',
|
||||
'@angular/compiler',
|
||||
'@angular/compiler-cli',
|
||||
'@angular/core',
|
||||
'@angular/elements',
|
||||
'@angular/forms',
|
||||
'@angular/language-service',
|
||||
'@angular/localize',
|
||||
'@angular/platform-browser',
|
||||
'@angular/platform-browser-dynamic',
|
||||
'@angular/platform-server',
|
||||
'@angular/router',
|
||||
'@angular/service-worker',
|
||||
'@angular/upgrade',
|
||||
{name: '@angular/animations'},
|
||||
{name: '@angular/bazel'},
|
||||
{name: '@angular/common'},
|
||||
{name: '@angular/compiler'},
|
||||
{name: '@angular/compiler-cli'},
|
||||
{name: '@angular/core'},
|
||||
{name: '@angular/elements'},
|
||||
{name: '@angular/forms'},
|
||||
{name: '@angular/language-service'},
|
||||
{name: '@angular/localize'},
|
||||
{name: '@angular/platform-browser'},
|
||||
{name: '@angular/platform-browser-dynamic'},
|
||||
{name: '@angular/platform-server'},
|
||||
{name: '@angular/router'},
|
||||
{name: '@angular/service-worker'},
|
||||
{name: '@angular/upgrade'},
|
||||
],
|
||||
buildPackages: async () => {
|
||||
// The buildTargetPackages function is loaded at runtime as the loading the script causes an
|
||||
|
||||
@@ -65,7 +65,6 @@ version: 3
|
||||
|
||||
availability:
|
||||
users_unavailable:
|
||||
- atscott # OOO as of 2021-12-01
|
||||
- pkozlowski-opensource # OOO as of 2020-09-28
|
||||
|
||||
# Meta field that goes unused by PullApprove to allow for defining aliases to be
|
||||
|
||||
+68
-291
@@ -1,5 +1,59 @@
|
||||
<a name="13.1.0-next.3"></a>
|
||||
# 13.1.0-next.3 (2021-12-01)
|
||||
<a name="13.1.3"></a>
|
||||
# 13.1.3 (2022-01-19)
|
||||
### animations
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [af0a152a2c](https://github.com/angular/angular/commit/af0a152a2cd5fc5c9d8d8581bde811be102b210a) | fix | apply setStyles to only rootTimelines ([#44515](https://github.com/angular/angular/pull/44515)) |
|
||||
### compiler-cli
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [626f3f230b](https://github.com/angular/angular/commit/626f3f230ba7e272ee324ed3a1c5650e156d1d6f) | perf | reduce analysis work during incremental rebuilds ([#44731](https://github.com/angular/angular/pull/44731)) |
|
||||
### ngcc
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [f9ca4d8499](https://github.com/angular/angular/commit/f9ca4d849950b2d1e8a7629deab520a0e6db2dac) | fix | support element accesses for export declarations ([#44669](https://github.com/angular/angular/pull/44669)) |
|
||||
## Special Thanks
|
||||
Alan Agius, Andrew Kushnir, AnkitSharma-007, Daniel Díaz, Dmytro Mezhenskyi, Jessica Janiuk, Joey Perrott, JoostK, Ramesh Thiruchelvam, dario-piotrowicz, iRealNirmal and Łukasz Holeczek
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="13.1.2"></a>
|
||||
# 13.1.2 (2022-01-12)
|
||||
### animations
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [abc217b28e](https://github.com/angular/angular/commit/abc217b28e43431e730c448235ab2e9801133768) | fix | retain triggers values for moved tracked list items ([#44578](https://github.com/angular/angular/pull/44578)) |
|
||||
### compiler
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [59eef29a6c](https://github.com/angular/angular/commit/59eef29a6c5d568ca80595cd7018e21ad406c85d) | fix | correct spans when parsing bindings with comments ([#44678](https://github.com/angular/angular/pull/44678)) |
|
||||
### compiler-cli
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [08049fa23f](https://github.com/angular/angular/commit/08049fa23f1fb751137a54b7460e90662abec476) | fix | enable narrowing of using type guard methods ([#44447](https://github.com/angular/angular/pull/44447)) |
|
||||
| [a26afce68c](https://github.com/angular/angular/commit/a26afce68c8270b66afa93567f952930523ebc7b) | fix | fix crash during type-checking of library builds ([#44587](https://github.com/angular/angular/pull/44587)) |
|
||||
| [1e918b6f31](https://github.com/angular/angular/commit/1e918b6f312e7c99f0eef02d5d093164d2e1e7ed) | fix | handle property reads of `ThisReceiver` in the indexer ([#44678](https://github.com/angular/angular/pull/44678)) |
|
||||
| [63c8e56a3a](https://github.com/angular/angular/commit/63c8e56a3a2566eca1b00751e0f05d188db95e34) | fix | incorrectly interpreting $any calls with a property read ([#44657](https://github.com/angular/angular/pull/44657)) |
|
||||
| [60fb27f12d](https://github.com/angular/angular/commit/60fb27f12ddf3e3cea1faa685c34ad98535340d0) | fix | properly index <svg> elements ([#44678](https://github.com/angular/angular/pull/44678)) |
|
||||
## Special Thanks
|
||||
Abdurrahman Abu-Hijleh, Adam Plumer, Alex Rickabaugh, AlirezaEbrahimkhani, Andrew Kushnir, Andrew Scott, Borja Paz Rodríguez, Chihab Otmani, Chris Mancini, Dario Piotrowicz, Doug Parker, George Kalpakas, Joey Perrott, JoostK, Kristiyan Kostadinov, Kyoz, Patrick Prakash, Paul Gschwendtner, Serhey Dolgushev, Yousaf Nawaz, Yuchao Wu, alkavats1, dario-piotrowicz, huangqing, ivanwonder, shejialuo, twerske, wszgrcy and zuckjet
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="13.1.1"></a>
|
||||
# 13.1.1 (2021-12-15)
|
||||
### animations
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [bb1d4ff315](https://github.com/angular/angular/commit/bb1d4ff31592836b5268f1b42fc05823aff212aa) | fix | don't consume instructions for animateChild ([#44357](https://github.com/angular/angular/pull/44357)) |
|
||||
| [d8b6adb7bc](https://github.com/angular/angular/commit/d8b6adb7bcf1ed6edc01c61406d30c86b2385284) | fix | should not invoke disabled child animations ([#37724](https://github.com/angular/angular/pull/37724)) |
|
||||
## Special Thanks
|
||||
Aristeidis Bampakos, Dylan Hunn, George Kalpakas, JoostK, Kristiyan Kostadinov, Paul Gschwendtner, Spej, Yousaf Nawaz, dario-piotrowicz, faso-dev, jaybell and zuckjet
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="13.1.0"></a>
|
||||
# 13.1.0 (2021-12-09)
|
||||
## Deprecations
|
||||
###
|
||||
- The `downgradeModule` function calls with NgModule factories are deprecated. Please use NgModule class based `downgradeModule` calls instead.
|
||||
@@ -15,40 +69,35 @@ accepts `ErrorEvent` when simulating XHR errors. Instead instances of
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [489cf42cd0](https://github.com/angular/angular/commit/489cf42cd07ac2b549ea958127590b30f1b3d28f) | fix | incorrect error type for XHR errors in `TestRequest` ([#36082](https://github.com/angular/angular/pull/36082)) |
|
||||
### compiler-cli
|
||||
| [13362972bb](https://github.com/angular/angular/commit/13362972bb5dae606889c06ff7718502057b6b9c) | perf | code size reduction of `ngFor` directive ([#44315](https://github.com/angular/angular/pull/44315)) |
|
||||
### compiler
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [6c1573bc08](https://github.com/angular/angular/commit/6c1573bc08099bee40a6214c68e82fe91848a08a) | fix | downlevel transform incorrectly extracting constructor parameters for nested classes ([#44281](https://github.com/angular/angular/pull/44281)) |
|
||||
| [48ca7dce4f](https://github.com/angular/angular/commit/48ca7dce4fe1474820abc296824cda9e7824c159) | fix | interpret string concat calls ([#44167](https://github.com/angular/angular/pull/44167)) |
|
||||
| [c85bcb0c63](https://github.com/angular/angular/commit/c85bcb0c636d65706541d44be62694720f12ad9e) | feat | reference ICU message IDs from their placeholders ([#43534](https://github.com/angular/angular/pull/43534)) |
|
||||
### core
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [5dff077d50](https://github.com/angular/angular/commit/5dff077d505da60ddead9f2ff2ddaaaea6feeb4a) | feat | add migration to remove entryComponents ([#44308](https://github.com/angular/angular/pull/44308)) |
|
||||
| [e65a245a0b](https://github.com/angular/angular/commit/e65a245a0b67c67f08a29f8c3ac2e3e7e824a029) | feat | add migration to remove entryComponents ([#44322](https://github.com/angular/angular/pull/44322)) |
|
||||
| [d56e3f43a1](https://github.com/angular/angular/commit/d56e3f43a1f3ca5004d2c5413167737cff7d936f) | feat | support TypeScript 4.5 ([#44164](https://github.com/angular/angular/pull/44164)) |
|
||||
| [b06e3981bc](https://github.com/angular/angular/commit/b06e3981bc1fa2b80465275cb657f0537b2c7385) | fix | add missing info about a component in the "pipe could not be found" error message ([#44081](https://github.com/angular/angular/pull/44081)) |
|
||||
| [43dfab447d](https://github.com/angular/angular/commit/43dfab447d48a4978e52d7c7d67d4527a79f4240) | fix | destroy hooks not set up for `useClass` provider using `forwardRef` ([#44281](https://github.com/angular/angular/pull/44281)) |
|
||||
| [b930547ffd](https://github.com/angular/angular/commit/b930547ffd951228c26e3c6bad456f90cc449e07) | fix | support cyclic metadata in TestBed overrides ([#44215](https://github.com/angular/angular/pull/44215)) |
|
||||
### forms
|
||||
### http
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [38c02e13a5](https://github.com/angular/angular/commit/38c02e13a51e6ae00df5a594936572d1b1cfd38c) | fix | make the `FormControlStatus` available as a public API ([#44183](https://github.com/angular/angular/pull/44183)) |
|
||||
### language-service
|
||||
| [d452b388bd](https://github.com/angular/angular/commit/d452b388bdc0d661f41ab382f5e7ac998b0f9915) | feat | add `has()` method to `HttpContext` class ([#43887](https://github.com/angular/angular/pull/43887)) |
|
||||
### localize
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [3aafa765ee](https://github.com/angular/angular/commit/3aafa765eef2dbbafd422050d21e7436b113a832) | fix | Correctly parse inputs and selectors with dollar signs ([#44268](https://github.com/angular/angular/pull/44268)) |
|
||||
| [d3cf222a81](https://github.com/angular/angular/commit/d3cf222a8193bc7ccd9e7ce886846d1f79131627) | feat | support "associated message ids" for placeholders ([#43534](https://github.com/angular/angular/pull/43534)) |
|
||||
### ngcc
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [de0975c6d9](https://github.com/angular/angular/commit/de0975c6d99bbe9332382a8f6f2b920f9e4b9d49) | fix | correctly report error when collecting dependencies of UMD module ([#44245](https://github.com/angular/angular/pull/44245)) |
|
||||
| [24b635395f](https://github.com/angular/angular/commit/24b635395f163e727effbf66da168dfbb29fc4a0) | fix | ensure that ngcc does not write a lock-file into node_modules package directories ([#44228](https://github.com/angular/angular/pull/44228)) |
|
||||
| [3c8a5d1c70](https://github.com/angular/angular/commit/3c8a5d1c706fe0ebff621f76eb9e98e0f5ec0f77) | fix | support the UMD wrapper function format emitted by Webpack ([#44245](https://github.com/angular/angular/pull/44245)) |
|
||||
### router
|
||||
| [41265919aa](https://github.com/angular/angular/commit/41265919aa90415911169057ef016e2f9b78aafd) | fix | correctly resolve UMD dependencies ([#44381](https://github.com/angular/angular/pull/44381)) |
|
||||
### upgrade
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [f44cb57c12](https://github.com/angular/angular/commit/f44cb57c12c29e76167272c675c0ce23838ce723) | fix | prevent componentless routes from being detached ([#44240](https://github.com/angular/angular/pull/44240)) |
|
||||
| [34f990986c](https://github.com/angular/angular/commit/34f990986cade3ce6b355354d1e2f6e5ec2f18ec) | feat | support NgModule class as an argument of the `downgradeModule` function ([#43973](https://github.com/angular/angular/pull/43973)) |
|
||||
## Special Thanks
|
||||
Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Artur, Christian-E, David Shevitz, Doug Parker, Douglas Parker, Dylan Hunn, George Kalpakas, Jessica Janiuk, Joey Perrott, JoostK, Kristiyan Kostadinov, Marc Redemske, Paul Gschwendtner, Pei Wang, Pete Bacon Darwin, Ramesh Thiruchelvam, Ravi Chandra, Rohan Pednekar, Ruslan Usmanov, dario-piotrowicz, profanis and unknown
|
||||
Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Doug Parker, Dustin M. Eastway, Dylan Hunn, George Kalpakas, HyperLife1119, Jelle Bruisten, Jessica Janiuk, Joey Perrott, JoostK, Kristiyan Kostadinov, Markus Doggweiler, Paul Gschwendtner, Pei Wang, Pete Bacon Darwin and dario-piotrowicz
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
@@ -88,16 +137,6 @@ Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Artur, Christian-E, D
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="13.1.0-next.2"></a>
|
||||
# 13.1.0-next.2 (2021-11-17)
|
||||
|
||||
This release contains various API docs improvements.
|
||||
|
||||
## Special Thanks
|
||||
Andrew Kushnir, Armen Vardanyan, Dylan Hunn, Joey Perrott, Martin von Gagern, Paul Gschwendtner, Pete Bacon Darwin, Ramesh Thiruchelvam, dario-piotrowicz and fusho-takahashi
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="13.0.2"></a>
|
||||
# 13.0.2 (2021-11-17)
|
||||
|
||||
@@ -108,39 +147,6 @@ Andrew Kushnir, Armen Vardanyan, Dylan Hunn, Joey Perrott, Martin von Gagern, Pa
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="13.1.0-next.1"></a>
|
||||
# 13.1.0-next.1 (2021-11-10)
|
||||
### compiler
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [393efa54e6](https://github.com/angular/angular/commit/393efa54e669c4ae1e479fd59fc4f9ea69ab77e9) | fix | ensure that partially compiled queries can handle forward references ([#44113](https://github.com/angular/angular/pull/44113)) |
|
||||
| [b249e24979](https://github.com/angular/angular/commit/b249e24979d1494957b429ef73f37b68b9087ef9) | fix | generate correct code for safe method calls ([#44088](https://github.com/angular/angular/pull/44088)) |
|
||||
### compiler-cli
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [2a2744721b](https://github.com/angular/angular/commit/2a2744721b429cbce7fd9dabc2963c1c679b67bd) | fix | ensure literal types are retained when `strictNullInputTypes` is disabled ([#38305](https://github.com/angular/angular/pull/38305)) |
|
||||
| [247c18dee0](https://github.com/angular/angular/commit/247c18dee011f8a743b0b438b8ba2f017b113921) | fix | handle pre-release versions when checking version ([#44109](https://github.com/angular/angular/pull/44109)) |
|
||||
### core
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [4f8eaac7ff](https://github.com/angular/angular/commit/4f8eaac7ff2b73dd18d6317c955d447011a69301) | fix | do not use Function constructors in development mode to avoid CSP violations ([#43587](https://github.com/angular/angular/pull/43587)) |
|
||||
### http
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [d452b388bd](https://github.com/angular/angular/commit/d452b388bdc0d661f41ab382f5e7ac998b0f9915) | feat | add `has()` method to `HttpContext` class ([#43887](https://github.com/angular/angular/pull/43887)) |
|
||||
### platform-browser
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [236bdff831](https://github.com/angular/angular/commit/236bdff831f7dc794d5a03e2d82921887bd5eda8) | fix | use correct parent in animation removeChild callback ([#44033](https://github.com/angular/angular/pull/44033)) |
|
||||
### upgrade
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [34f990986c](https://github.com/angular/angular/commit/34f990986cade3ce6b355354d1e2f6e5ec2f18ec) | feat | support NgModule class as an argument of the `downgradeModule` function ([#43973](https://github.com/angular/angular/pull/43973)) |
|
||||
## Special Thanks
|
||||
A. Singh, Alan Agius, Andrew Kushnir, Andrew Scott, Aristeidis Bampakos, Dustin M. Eastway, George Kalpakas, HyperLife1119, Jelle Bruisten, Joe Martin (Crowdstaffing), Joel Lefkowitz, Joey Perrott, JoostK, Kristiyan Kostadinov, Michael Urban, Paul Gschwendtner, Pavan Kumar Jadda, Pei Wang, Pete Bacon Darwin, Roman Frołow, dario-piotrowicz, iRealNirmal, ileil, kreuzerk, mgechev, profanis and raman
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="13.0.1"></a>
|
||||
# 13.0.1 (2021-11-10)
|
||||
### compiler
|
||||
@@ -166,235 +172,6 @@ A. Singh, Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Aristeidis
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="13.1.0-next.0"></a>
|
||||
# 13.1.0-next.0 (2021-11-03)
|
||||
### compiler
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [c85bcb0c63](https://github.com/angular/angular/commit/c85bcb0c636d65706541d44be62694720f12ad9e) | feat | reference ICU message IDs from their placeholders ([#43534](https://github.com/angular/angular/pull/43534)) |
|
||||
### localize
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [d3cf222a81](https://github.com/angular/angular/commit/d3cf222a8193bc7ccd9e7ce886846d1f79131627) | feat | support "associated message ids" for placeholders ([#43534](https://github.com/angular/angular/pull/43534)) |
|
||||
## Special Thanks
|
||||
Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Doug Parker, Dylan Hunn, George Kalpakas, Jessica Janiuk, Joey Perrott, Paul Gschwendtner and Pete Bacon Darwin
|
||||
|
||||
|
||||
<a name="13.0.0"></a>
|
||||
# 13.0.0 (2021-11-03)
|
||||
|
||||
[Blog post "Angular v13 is now available"](http://goo.gle/angular-v13).
|
||||
|
||||
## Breaking Changes
|
||||
### common
|
||||
- The behavior of the `SpyLocation` used by the `RouterTestingModule` has changed
|
||||
to match the behavior of browsers. It no longer emits a 'popstate' event
|
||||
when `Location.go` is called. In addition, `simulateHashChange` now
|
||||
triggers _both_ a `hashchange` and a `popstate` event.
|
||||
Tests which use `location.go` and expect the changes to be picked up by
|
||||
the `Router` should likely change to `simulateHashChange` instead.
|
||||
Each test is different in what it attempts to assert so there is no
|
||||
single change that works for all tests. Each test using the `SpyLocation` to
|
||||
simulate browser URL changes should be evaluated on a case-by-case basis.
|
||||
### core
|
||||
- TypeScript versions older than 4.4.2 are no longer supported.
|
||||
|
||||
- NodeJS versions older than `v12.20.0` are no longer
|
||||
supported due to the Angular packages using the NodeJS package exports
|
||||
feature with subpath patterns.
|
||||
|
||||
- The `WrappedValue` class can no longer be imported from `@angular/core`,
|
||||
which may result in compile errors or failures at runtime if outdated
|
||||
libraries are used that are still using `WrappedValue`. The usage of
|
||||
`WrappedValue` should be removed as no replacement is available.
|
||||
### forms
|
||||
- A new type called `FormControlStatus` has been introduced, which is a union of all possible status strings for form controls. `AbstractControl.status` has been narrowed from `string` to `FormControlStatus`, and `statusChanges` has been narrowed from `Observable<any>` to `Observable<FormControlStatus>`. Most applications should consume the new types seamlessly. Any breakage caused by this change is likely due to one of the following two problems: (1) the app is comparing `AbstractControl.status` against a string which is not a valid status; or, (2) the app is using `statusChanges` events as if they were something other than strings.
|
||||
### router
|
||||
- The default url serializer would previously drop
|
||||
everything after and including a question mark in query parameters. That
|
||||
is, for a navigation to `/path?q=hello?&other=123`, the query
|
||||
params would be parsed to just `{q: 'hello'}`. This is
|
||||
incorrect because the URI spec allows for question mark characers in
|
||||
query data. This change will now correctly parse the params for the
|
||||
above example to be `{v: 'hello?', other: '123'}`.
|
||||
|
||||
- Previously `null` and `undefined` inputs for `routerLink` were
|
||||
equivalent to empty string and there was no way to disable the link's
|
||||
navigation.
|
||||
In addition, the `href` is changed from a property `HostBinding()` to an
|
||||
attribute binding (`HostBinding('attr.href')`). The effect of this
|
||||
change is that `DebugElement.properties['href']` will now return the
|
||||
`href` value returned by the native element which will be the full URL
|
||||
rather than the internal value of the `RouterLink` `href` property.
|
||||
|
||||
- The router will no longer replace the browser URL when a new navigation
|
||||
cancels an ongoing navigation. This often causes URL flicker and was
|
||||
only in place to support some AngularJS hybrid applications. Hybrid
|
||||
applications which rely on the `navigationId` being present on initial
|
||||
navigations that were handled by the Angular router should instead
|
||||
subscribe to `NavigationCancel` events and perform the
|
||||
`location.replaceState` themselves to add `navigationId` to the Router
|
||||
state.
|
||||
In addition, tests which assert `urlChanges` on the `SpyLocation` may
|
||||
need to be adjusted to account for the `replaceState` which is no longer
|
||||
triggered.
|
||||
|
||||
- It is no longer possible to use `Route.loadChildren` using a string
|
||||
value. The following supporting classes were removed from
|
||||
`@angular/core`:
|
||||
|
||||
- `NgModuleFactoryLoader`
|
||||
- `SystemJsNgModuleFactoryLoader`
|
||||
|
||||
The `@angular/router` package no longer exports these symbols:
|
||||
|
||||
- `SpyNgModuleFactoryLoader`
|
||||
- `DeprecatedLoadChildren`
|
||||
|
||||
The signature of the `setupTestingRouter` function from
|
||||
`@angular/core/testing` has been changed to drop its `NgModuleFactoryLoader`
|
||||
parameter, as an argument for that parameter can no longer be created.
|
||||
### service-worker
|
||||
- The return type of `SwUpdate#activateUpdate` and `SwUpdate#checkForUpdate` changed to `Promise<boolean>`.
|
||||
|
||||
Although unlikely, it is possible that this change will cause TypeScript type-checking to fail in
|
||||
some cases. If necessary, update your types to account for the new
|
||||
return type.
|
||||
## Deprecations
|
||||
### core
|
||||
- Angular no longer requires component factories to dynamically create components. The factory-based signature of the `ViewContainerRef.createComponent` function is deprecated in favor of a different signature that allows passing component classes instead.
|
||||
|
||||
- The `getModuleFactory` function is deprecated in favor of the `getNgModuleById` one. With Ivy it's possible to work with NgModule classes directly, without retrieving corresponding factories, so the `getNgModuleById` should be used instead.
|
||||
|
||||
- Ivy made it possible to avoid the need to resolve Component and NgModule factories. Framework APIs allow to use Component and NgModule Types directly. As a result, the `PlatformRef.bootstrapModuleFactory` and a factory-based signature of the `ApplicationRef.bootstrap` method are now obsolete and are now deprecated. The `PlatformRef.bootstrapModuleFactory` calls can be replaced with `PlatformRef.bootstrapModule` ones. The `ApplicationRef.bootstrap` method allows to provide Component Type, so this can be used a replacement for the factory-based calls.
|
||||
|
||||
- In ViewEngine, [JIT compilation](https://angular.io/guide/glossary#jit) required special providers (like `Compiler`, `CompilerFactory`, etc) to be injected in the app and corresponding methods to be invoked. With Ivy, JIT compilation takes place implicitly if the Component, NgModule, etc have not already been [AOT compiled](https://angular.io/guide/glossary#aot). Those special providers were made available in Ivy for backwards-compatibility with ViewEngine to make the transition to Ivy smoother. Since ViewEngine is deprecated and will soon be removed, those symbols are now deprecated as well:
|
||||
|
||||
- `ModuleWithComponentFactories`
|
||||
- `Compiler`
|
||||
- `CompilerFactory`
|
||||
- `JitCompilerFactory`
|
||||
- `NgModuleFactory`
|
||||
|
||||
Important note: this deprecation doesn't affect JIT mode in Ivy (JIT remains available with Ivy).
|
||||
|
||||
- In Ivy, AOT summary files are unused in TestBed. Passing AOT summary files in TestBed has no effect, so the `aotSummaries` usage in TestBed is deprecated and will be removed in a future version of Angular.
|
||||
### platform-server
|
||||
- The `renderModuleFactory` symbol in `@angular/platform-server` is no longer necessary as of Angular v13.
|
||||
|
||||
The `renderModuleFactory` calls can be replaced with `renderModule`.
|
||||
### service-worker
|
||||
- The `SwUpdate#activated` observable is deprecated.
|
||||
|
||||
The `SwUpdate#activated` observable only emits values as a direct response to calling
|
||||
`SwUpdate#activateUpdate()` and was only useful for determining whether the call resulted in an
|
||||
update or not. Now, the return value of `SwUpdate#activateUpdate()` can be used to determine the
|
||||
outcome of the operation and therefore using `SwUpdate#activated` does not offer any benefit.
|
||||
|
||||
- The `SwUpdate#availalbe` observable is deprecated.
|
||||
|
||||
The new `SwUpdate#versionUpdates` observable provides the same information and more. Therefore, it
|
||||
is possible to rebuild the same behavior as `SwUpdate#availalbe` using the events emitted by
|
||||
`SwUpdate#versionUpdates` and filtering for `VersionReadyEvent` events.
|
||||
As a result, the `SwUpdate#availalbe` observable is now redundant.
|
||||
###
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [747553dd68](https://github.com/angular/angular/commit/747553dd68209fe25a9704fe7094b4b3fb38bf06) | docs | deprecate ViewEngine-based `renderModuleFactory` ([#43757](https://github.com/angular/angular/pull/43757)) |
|
||||
### bazel
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [62d7005a52](https://github.com/angular/angular/commit/62d7005a52304f41a48f878f176f40e90437a555) | feat | add `strict_templates` and `experimental_extended_template_diagnostics` to `ng_module()` rule ([#43582](https://github.com/angular/angular/pull/43582)) |
|
||||
| [d977701a43](https://github.com/angular/angular/commit/d977701a43866e9f9fae9f83f224e4b6980a8bd4) | feat | allow for custom conditions to be set in `ng_package` targets ([#43764](https://github.com/angular/angular/pull/43764)) |
|
||||
| [4886585875](https://github.com/angular/angular/commit/48865858750bc1607f20db9b6bf9f913870742bc) | feat | create transition for enabling partial compilation ([#43431](https://github.com/angular/angular/pull/43431)) |
|
||||
| [cd1b52483e](https://github.com/angular/angular/commit/cd1b52483e886f6e2ad6cde23ff8a2225cafa219) | feat | expose `esm2020` and `es2020` conditions in APF package exports ([#43740](https://github.com/angular/angular/pull/43740)) |
|
||||
| [49b82ae561](https://github.com/angular/angular/commit/49b82ae56112c1e0d58ac28bcab1705e1f678ab1) | feat | implement partial compilation APF v13 for `ng_package` rule ([#43431](https://github.com/angular/angular/pull/43431)) |
|
||||
| [274cb38e0b](https://github.com/angular/angular/commit/274cb38e0bb9a8bff4a48d1d15f4e16e59ec6f88) | feat | switch prodmode output to ES2020 ([#43431](https://github.com/angular/angular/pull/43431)) |
|
||||
| [73ac50c447](https://github.com/angular/angular/commit/73ac50c44759c5d3048f11d6f98b98a5e625df58) | feat | wire up partial compilation build setting in `ng_module` ([#43431](https://github.com/angular/angular/pull/43431)) |
|
||||
| [e0a72857cc](https://github.com/angular/angular/commit/e0a72857ccda2b21a91875ee714fef608b54c083) | fix | construct a manifest file even when warnings are emitted ([#43582](https://github.com/angular/angular/pull/43582)) |
|
||||
| [dbe656d1e0](https://github.com/angular/angular/commit/dbe656d1e0569304c7001296ec90cf2e9cc8c91f) | fix | ngc-wrapped should not rely on linker for external workspaces ([#43690](https://github.com/angular/angular/pull/43690)) |
|
||||
### common
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [adf4481211](https://github.com/angular/angular/commit/adf4481211ac0a2eabf560f42ef5193ca550ec98) | feat | add injection token for default date pipe timezone ([#43611](https://github.com/angular/angular/pull/43611)) |
|
||||
| [c6a93001eb](https://github.com/angular/angular/commit/c6a93001eb74374b0fbc6aea1286fe1183d21382) | fix | synchronise location mock behavior with the navigators ([#41730](https://github.com/angular/angular/pull/41730)) |
|
||||
### compiler
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [14b492df26](https://github.com/angular/angular/commit/14b492df26fcb3f2218f67878a382e8f7dff2c05) | fix | do not error if $any is used inside a listener ([#43866](https://github.com/angular/angular/pull/43866)) |
|
||||
### compiler-cli
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [bed121c34f](https://github.com/angular/angular/commit/bed121c34f9c4ec4741a4690693423bb7ed66982) | feat | inline resources when generating class metadata calls ([#43178](https://github.com/angular/angular/pull/43178)) |
|
||||
| [263feba5c2](https://github.com/angular/angular/commit/263feba5c2d56e8433068718d1fdcbc3b2ae144c) | fix | handle nullable expressions correctly in the nullish coalescing extended template diagnostic ([#43572](https://github.com/angular/angular/pull/43572)) |
|
||||
| [8f7fdc59af](https://github.com/angular/angular/commit/8f7fdc59af7f1b0a51b07e69044368c223b9f186) | fix | not evaluating new signature for __spreadArray ([#43618](https://github.com/angular/angular/pull/43618)) |
|
||||
| [426a3ecae7](https://github.com/angular/angular/commit/426a3ecae7288c2cb3e8928d7fe56b0b4552d821) | fix | updates `ngc` to pass the build when only warnings are emitted ([#43673](https://github.com/angular/angular/pull/43673)) |
|
||||
### core
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [a3960846da](https://github.com/angular/angular/commit/a3960846da1f73282306560302daa3a4ddeca0f7) | feat | add `createNgModuleRef` function to create `NgModuleRef` based on NgModule class ([#43580](https://github.com/angular/angular/pull/43580)) |
|
||||
| [fe1f6421d2](https://github.com/angular/angular/commit/fe1f6421d2b647adb706e65f69ec2e40e604fac3) | feat | add `getNgModuleById` function to retrieve loaded NgModules by id ([#43580](https://github.com/angular/angular/pull/43580)) |
|
||||
| [81c7eb813c](https://github.com/angular/angular/commit/81c7eb813c27f08d2d640f34e165a1b5e487bac2) | feat | add migration to opt out existing apps from new test module teardown behavior ([#43353](https://github.com/angular/angular/pull/43353)) |
|
||||
| [e57691c9c5](https://github.com/angular/angular/commit/e57691c9c5f8456f7dc75180aa1e80330da560fe) | feat | Add migration to update empty routerLinks in templates ([#43176](https://github.com/angular/angular/pull/43176)) |
|
||||
| [7dccbdd27b](https://github.com/angular/angular/commit/7dccbdd27be13eb7287f535f482b1de2c13fca74) | feat | add support for Types in ViewContainerRef.createComponent ([#43022](https://github.com/angular/angular/pull/43022)) |
|
||||
| [c14085e434](https://github.com/angular/angular/commit/c14085e43493f0a1eaea1df949cbf6f3b13b72a0) | feat | drop support for TypeScript 4.2 and 4.3 ([#43642](https://github.com/angular/angular/pull/43642)) |
|
||||
| [94ba59bc9d](https://github.com/angular/angular/commit/94ba59bc9db81ae04f20e8147b5133a0d3d45510) | feat | enable test module teardown by default ([#43353](https://github.com/angular/angular/pull/43353)) |
|
||||
| [ea61ec2562](https://github.com/angular/angular/commit/ea61ec25628206d18a424906f685c0d0fd6aa714) | feat | support TypeScript 4.4 ([#43281](https://github.com/angular/angular/pull/43281)) |
|
||||
| [e0a0d05d45](https://github.com/angular/angular/commit/e0a0d05d45bcb93448a8c2fd03f9e1783146cf00) | feat | update node version support range to support v16 ([#43740](https://github.com/angular/angular/pull/43740)) |
|
||||
| [7396021e4b](https://github.com/angular/angular/commit/7396021e4b22faca47b7fc0bab188c838090f3e7) | fix | avoid duplicating comments in TestBed teardown migration ([#43776](https://github.com/angular/angular/pull/43776)) |
|
||||
| [7fd0428aae](https://github.com/angular/angular/commit/7fd0428aae3a7d94bfc8fee764ac24f5fe3fbb41) | fix | don't rethrow errors if test teardown has been disabled ([#43635](https://github.com/angular/angular/pull/43635)) |
|
||||
| [66fb311d20](https://github.com/angular/angular/commit/66fb311d205e51647e2c1f84a6e3adf5ef3cfd64) | fix | incorrect signature for initTestEnvironment ([#43615](https://github.com/angular/angular/pull/43615)) |
|
||||
| [8ae99821d6](https://github.com/angular/angular/commit/8ae99821d657ba940df998f6abec425f8a1f4cb1) | fix | support `InjectFlags` argument in `NodeInjector.get()` ([#41592](https://github.com/angular/angular/pull/41592)) |
|
||||
| [8878183521](https://github.com/angular/angular/commit/88781835212354d7058a3674a04c2a1dd4b8f9c3) | perf | remove support for the deprecated `WrappedValue` ([#43507](https://github.com/angular/angular/pull/43507)) |
|
||||
### elements
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [a468213f34](https://github.com/angular/angular/commit/a468213f34943b7ddf234e6f9fd406431173d6a0) | fix | remove `ng-add` schematic ([#43975](https://github.com/angular/angular/pull/43975)) |
|
||||
| [f544a53f5f](https://github.com/angular/angular/commit/f544a53f5f3667b4c557537543a9b74a122d5f24) | fix | remove incorrect `@angular/platform-browser` peer dependency ([#43975](https://github.com/angular/angular/pull/43975)) |
|
||||
### forms
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [d9d8f950e9](https://github.com/angular/angular/commit/d9d8f950e90567c79b43eb156b81810a9f3d5c93) | feat | allow disabling min/max validators dynamically (by setting the value to `null`) ([#42978](https://github.com/angular/angular/pull/42978)) |
|
||||
| [e49fc96ed3](https://github.com/angular/angular/commit/e49fc96ed33c26434a14b80487dd912d8c76cace) | feat | Make Form Statuses use stricter types. ([#42952](https://github.com/angular/angular/pull/42952)) |
|
||||
### language-service
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [b10d90bef6](https://github.com/angular/angular/commit/b10d90bef6a3d1b721d087268aa7377985dd4c4f) | feat | Add method for retrieving the component template at the cursor location ([#43208](https://github.com/angular/angular/pull/43208)) |
|
||||
| [d5f9890c92](https://github.com/angular/angular/commit/d5f9890c9205b4a121275ace84b26776aedd0478) | feat | auto-apply optional chaining on nullable symbol ([#42995](https://github.com/angular/angular/pull/42995)) |
|
||||
| [69957f72e2](https://github.com/angular/angular/commit/69957f72e240e516fe65146c314014fadc43dd1f) | feat | provide snippets for attribute ([#43590](https://github.com/angular/angular/pull/43590)) |
|
||||
| [fc3b50e427](https://github.com/angular/angular/commit/fc3b50e4275c84a1cd3f75e4b52ee2dc4b65c35c) | fix | exclude the `SafePropertyRead` when applying the optional chaining ([#43321](https://github.com/angular/angular/pull/43321)) |
|
||||
### migrations
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [95a68c5dc3](https://github.com/angular/angular/commit/95a68c5dc3b72c0fe275e5025445befec3d9dc1e) | fix | account for CRLF characters in template migrations ([#44013](https://github.com/angular/angular/pull/44013)) |
|
||||
| [77bd2538cb](https://github.com/angular/angular/commit/77bd2538cb8fe114a326209791d7ec043d65ea9e) | fix | apply individual expression edits to preserve newline characters ([#43519](https://github.com/angular/angular/pull/43519)) |
|
||||
| [d849350c7b](https://github.com/angular/angular/commit/d849350c7bf19117bbf85e2d854b5be4d5eb4b25) | fix | Ensure routerLink migration doesn't update unrelated files ([#43519](https://github.com/angular/angular/pull/43519)) |
|
||||
| [2efc18e675](https://github.com/angular/angular/commit/2efc18e6757157589004e23d8d22b7967de4387d) | fix | migration failed finding tsconfig file ([#43343](https://github.com/angular/angular/pull/43343)) |
|
||||
| [b6f2a55147](https://github.com/angular/angular/commit/b6f2a551475126893c4ceff1241314067e14d0b6) | fix | prevent migrations from updating external templates multiple times ([#44013](https://github.com/angular/angular/pull/44013)) |
|
||||
### router
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [4f3beffdbf](https://github.com/angular/angular/commit/4f3beffdbfa974b380b2225f163d363dd17e10bd) | feat | emit activate/deactivate events when an outlet gets attached/detached ([#43333](https://github.com/angular/angular/pull/43333)) |
|
||||
| [faf9f5a3bc](https://github.com/angular/angular/commit/faf9f5a3bc444bb6cbf75916c8022f60e0742bca) | feat | new output that would notify when link is activated ([#43280](https://github.com/angular/angular/pull/43280)) |
|
||||
| [3c6b653089](https://github.com/angular/angular/commit/3c6b653089837459809a370ebcaf8911c3bab9ed) | feat | Option to correctly restore history on failed navigation ([#43289](https://github.com/angular/angular/pull/43289)) |
|
||||
| [784671597e](https://github.com/angular/angular/commit/784671597e0b28d9696bdc325b426a6c7be0cd8e) | fix | Allow question marks in query param values ([#31187](https://github.com/angular/angular/pull/31187)) |
|
||||
| [796da641f0](https://github.com/angular/angular/commit/796da641f0a29e9f5f5de115c456da37426e971c) | fix | Do not modify parts of URL excluded from with 'eager' updates ([#43421](https://github.com/angular/angular/pull/43421)) |
|
||||
| [772e08d14e](https://github.com/angular/angular/commit/772e08d14e534f20e4376109e81604965e189abf) | fix | fix Router's public API for canceledNavigationResolution ([#43842](https://github.com/angular/angular/pull/43842)) |
|
||||
| [ccb09b4558](https://github.com/angular/angular/commit/ccb09b4558a3864fb5b2fe2214d08f1c1fe2758f) | fix | null/undefined routerLink should disable navigation ([#43087](https://github.com/angular/angular/pull/43087)) |
|
||||
| [9e039ca68b](https://github.com/angular/angular/commit/9e039ca68bfae5328f3fc1f16fabd7673c466a25) | fix | Only trigger router navigation on `popstate` events from `Location` subscription ([#43328](https://github.com/angular/angular/pull/43328)) |
|
||||
| [c5d0bd4966](https://github.com/angular/angular/commit/c5d0bd4966a4fc595d57f75569754b4d224ef2ba) | fix | Prevent URL flicker when new navigations cancel ongoing ones ([#43496](https://github.com/angular/angular/pull/43496)) |
|
||||
| [adc68b100b](https://github.com/angular/angular/commit/adc68b100b98aef171ee298cc23bd5291b106526) | fix | reuse route strategy fix ([#43791](https://github.com/angular/angular/pull/43791)) |
|
||||
| [361273fad5](https://github.com/angular/angular/commit/361273fad5030c900c83d333a779f6edbe20c688) | refactor | remove support for `loadChildren` string syntax ([#43591](https://github.com/angular/angular/pull/43591)) |
|
||||
### service-worker
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [59225f5586](https://github.com/angular/angular/commit/59225f5586f1319a47768cef2e3325d7ab6940af) | feat | `SwUpdate#activeUpdate` and `SwUpdate#checkForUpdate` should have a meaningful outcome ([#43668](https://github.com/angular/angular/pull/43668)) |
|
||||
| [0dc45446fe](https://github.com/angular/angular/commit/0dc45446fe487febaefaf68a928c5a249880f2f3) | feat | expose more version update events ([#43668](https://github.com/angular/angular/pull/43668)) |
|
||||
## Special Thanks
|
||||
Ahmed Ayed, Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Bjarki, Charles Lyding, Dmitrij Kuba, Doug Parker, Dylan Hunn, George Kalpakas, Jessica Janiuk, Jochen Kraushaar, Joe Martin (Crowdstaffing), Joey Perrott, Jon Rimmer, JoostK, Kristiyan Kostadinov, Maximilian Köller, Paul Gschwendtner, Pei Wang, Pete Bacon Darwin, Tomasz Domański, Willy Schott, anandtiwary, dario-piotrowicz, iRealNirmal, ivanwonder, krzysztof-grzybek, mgechev and vthinkxie
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="12.2.13"></a>
|
||||
# 12.2.13 (2021-11-03)
|
||||
### compiler-cli
|
||||
@@ -4252,7 +4029,7 @@ import from `@angular/localize`. Previously it was `@angular/localize/run_time`.
|
||||
This should impact very few users and the user's that are impacted have a very easy upgrade path to switch to fetching the protractor_web_test_suite rule via the @bazel/protractor npm package.
|
||||
* **ivy:** This commit removes the public export of `hasBeenProcessed()`.
|
||||
|
||||
This was exported to be availble to the CLI integration but was never
|
||||
This was exported to be available to the CLI integration but was never
|
||||
used. The change to the function signature is a breaking change in itself
|
||||
so we remove the function altogether to simplify and lower the public
|
||||
API surface going forward.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2021 Google LLC. https://angular.io/license
|
||||
Copyright (c) 2010-2022 Google LLC. https://angular.io/license
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -156,4 +156,4 @@ Join the conversation and help the community.
|
||||
[gitter]: https://gitter.im/angular/angular
|
||||
[stackoverflow]: https://stackoverflow.com/questions/tagged/angular
|
||||
[youtube]: https://youtube.com/angular
|
||||
[meetup]: https://www.meetup.com/find/?keywords=angular"
|
||||
[meetup]: https://www.meetup.com/find/?keywords=angular
|
||||
|
||||
@@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
# Fetch rules_nodejs so we can install our npm dependencies
|
||||
http_archive(
|
||||
name = "build_bazel_rules_nodejs",
|
||||
sha256 = "4913ea835810c195df24d3a929315c29a64566cc48e409d8b0f35008b4e02e59",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.4.4/rules_nodejs-4.4.4.tar.gz"],
|
||||
sha256 = "ddb78717b802f8dd5d4c01c340ecdc007c8ced5c1df7db421d0df3d642ea0580",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.6.0/rules_nodejs-4.6.0.tar.gz"],
|
||||
)
|
||||
|
||||
# The PKG rules are needed to build tar packages for integration tests. The builtin
|
||||
@@ -40,6 +40,9 @@ load("//integration:npm_package_archives.bzl", "npm_package_archives")
|
||||
|
||||
yarn_install(
|
||||
name = "npm",
|
||||
# Note that we add the postinstall script here so that the dependencies are re-installed
|
||||
# when the postinstall patches are modified.
|
||||
data = ["//tools:postinstall-patches.js"],
|
||||
manual_build_file_contents = npm_package_archives(),
|
||||
package_json = "//:package.json",
|
||||
yarn_lock = "//:yarn.lock",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"jasmine": "^3.6.1",
|
||||
"nock": "^13.0.4",
|
||||
"node-fetch": "^2.6.1",
|
||||
"shelljs": "^0.8.4",
|
||||
"shelljs": "^0.8.5",
|
||||
"source-map-support": "^0.5.19",
|
||||
"tar-stream": "^2.1.3",
|
||||
"tslib": "^2.3.0"
|
||||
|
||||
@@ -2209,10 +2209,10 @@ shell-quote@^1.6.1:
|
||||
array-reduce "~0.0.0"
|
||||
jsonify "~0.0.0"
|
||||
|
||||
shelljs@^0.8.4:
|
||||
version "0.8.4"
|
||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2"
|
||||
integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==
|
||||
shelljs@^0.8.5:
|
||||
version "0.8.5"
|
||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c"
|
||||
integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==
|
||||
dependencies:
|
||||
glob "^7.0.0"
|
||||
interpret "^1.0.0"
|
||||
|
||||
@@ -8,13 +8,11 @@
|
||||
placeholder="Search heroes">
|
||||
|
||||
<ul class="heroes" [@filterAnimation]="heroesTotal">
|
||||
<!-- #enddocregion filter-animations -->
|
||||
<li *ngFor="let hero of heroes" class="hero">
|
||||
<div class="inner">
|
||||
<span class="badge">{{ hero.id }}</span>
|
||||
<span>{{ hero.name }}</span>
|
||||
</div>
|
||||
</li>
|
||||
<!-- #docregion filter-animations -->
|
||||
</ul>
|
||||
<!-- #enddocregion filter-animations -->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- #docregion -->
|
||||
<h2>Hero List</h2>
|
||||
|
||||
<p><i>Select a hero from the list to see details.</i></p>
|
||||
<p><em>Select a hero from the list to see details.</em></p>
|
||||
<ul>
|
||||
<li *ngFor="let hero of heroes" (click)="selectHero(hero)">
|
||||
{{hero.name}}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { TaxRateService } from './tax-rate.service';
|
||||
selector: 'app-sales-tax',
|
||||
template: `
|
||||
<h2>Sales Tax Calculator</h2>
|
||||
<p><i>Enter a number and press enter to calculate tax.</i></p>
|
||||
<p><em>Enter a number and press enter to calculate tax.</em></p>
|
||||
<label for="amount-input">Amount: </label>
|
||||
<input type="text" id="amount-input" #amountBox (change)="0">
|
||||
<div *ngIf="amountBox.value">
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Directive, ElementRef } from '@angular/core';
|
||||
selector: '[appHighlight]'
|
||||
})
|
||||
export class HighlightDirective {
|
||||
constructor(el: ElementRef) {
|
||||
el.nativeElement.style.backgroundColor = 'yellow';
|
||||
constructor(private el: ElementRef) {
|
||||
this.el.nativeElement.style.backgroundColor = 'yellow';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,9 +14,11 @@ export class HighlightDirective {
|
||||
@Input() appHighlight = '';
|
||||
// #enddocregion input
|
||||
|
||||
// #docregion mouse-enter
|
||||
@HostListener('mouseenter') onMouseEnter() {
|
||||
this.highlight(this.appHighlight || 'red');
|
||||
}
|
||||
// #enddocregion mouse-enter
|
||||
|
||||
@HostListener('mouseleave') onMouseLeave() {
|
||||
this.highlight('');
|
||||
|
||||
@@ -12,11 +12,11 @@ export class HighlightDirective {
|
||||
@Input() defaultColor = '';
|
||||
// #enddocregion defaultColor
|
||||
|
||||
@Input('appHighlight') highlightColor = '';
|
||||
@Input() appHighlight = '';
|
||||
|
||||
// #docregion mouse-enter
|
||||
@HostListener('mouseenter') onMouseEnter() {
|
||||
this.highlight(this.highlightColor || this.defaultColor || 'red');
|
||||
this.highlight(this.appHighlight || this.defaultColor || 'red');
|
||||
}
|
||||
// #enddocregion mouse-enter
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// #docregion
|
||||
import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, Input, OnDestroy, AfterViewInit, ViewChild } from '@angular/core';
|
||||
|
||||
import { AdDirective } from './ad.directive';
|
||||
import { AdItem } from './ad-item';
|
||||
@@ -17,7 +17,7 @@ import { AdComponent } from './ad.component';
|
||||
// #enddocregion ad-host
|
||||
})
|
||||
// #docregion class
|
||||
export class AdBannerComponent implements OnInit, OnDestroy {
|
||||
export class AdBannerComponent implements AfterViewInit, OnDestroy {
|
||||
@Input() ads: AdItem[] = [];
|
||||
|
||||
currentAdIndex = -1;
|
||||
@@ -25,7 +25,7 @@ export class AdBannerComponent implements OnInit, OnDestroy {
|
||||
@ViewChild(AdDirective, {static: true}) adHost!: AdDirective;
|
||||
interval: number|undefined;
|
||||
|
||||
ngOnInit() {
|
||||
ngAfterViewInit() {
|
||||
this.loadComponent();
|
||||
this.getAds();
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angul
|
||||
})
|
||||
export class AuthGuard implements CanActivate {
|
||||
canActivate(
|
||||
next: ActivatedRouteSnapshot,
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): boolean {
|
||||
console.log('AuthGuard#canActivate called');
|
||||
return true;
|
||||
|
||||
@@ -11,7 +11,7 @@ export class AuthGuard implements CanActivate {
|
||||
constructor(private authService: AuthService, private router: Router) {}
|
||||
|
||||
canActivate(
|
||||
next: ActivatedRouteSnapshot,
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): true|UrlTree {
|
||||
const url: string = state.url;
|
||||
|
||||
|
||||
@@ -9,11 +9,12 @@
|
||||
import { Observable } from 'rxjs';
|
||||
import { ajax } from 'rxjs/ajax';
|
||||
|
||||
// Create an Observable that will create an AJAX request
|
||||
// #enddocregion ajax
|
||||
|
||||
export function docRegionAjax<T>(console: Console,
|
||||
ajax: (url: string) => Observable<{status: number, response: T}>) {
|
||||
// #docregion ajax
|
||||
// Create an Observable that will create an AJAX request
|
||||
const apiData = ajax('/api/data');
|
||||
// Subscribe to create the request
|
||||
apiData.subscribe(res => console.log(res.status, res.response));
|
||||
|
||||
@@ -245,7 +245,7 @@ As of webpack v4 the flattening of ES modules optimization should not be necessa
|
||||
|
||||
By default, EcmaScript Modules are side-effectful: importing from a module ensures that any code at the top level of that module will execute. This is often undesirable, as most side-effectful code in typical modules is not truly side-effectful, but instead only affects specific symbols. If those symbols are not imported and used, it's often desirable to remove them in an optimization process known as tree-shaking, and the side-effectful code can prevent this.
|
||||
|
||||
Build tools such as Webpack support a flag which allows ackages to declare that they do not depend on side-effectful code at the top level of their modules, giving the tools more freedom to tree-shake code from the package. The end result of these optimizations should be smaller bundle size and better code distribution in bundle chunks after code-splitting. This optimization can break your code if it contains non-local side-effects - this is however not common in Angular applications and it's usually a sign of bad design. Our recommendation is for all packages to claim the side-effect free status by setting the `sideEffects` property to `false`, and that developers follow the [Angular Style Guide](https://angular.io/guide/styleguide) which naturally results in code without non-local side-effects.
|
||||
Build tools such as Webpack support a flag which allows packages to declare that they do not depend on side-effectful code at the top level of their modules, giving the tools more freedom to tree-shake code from the package. The end result of these optimizations should be smaller bundle size and better code distribution in bundle chunks after code-splitting. This optimization can break your code if it contains non-local side-effects - this is however not common in Angular applications and it's usually a sign of bad design. Our recommendation is for all packages to claim the side-effect free status by setting the `sideEffects` property to `false`, and that developers follow the [Angular Style Guide](https://angular.io/guide/styleguide) which naturally results in code without non-local side-effects.
|
||||
|
||||
More info: [webpack docs on side-effects](https://github.com/webpack/webpack/tree/master/examples/side-effects)
|
||||
|
||||
|
||||
@@ -82,11 +82,11 @@ In HTML, these attributes are set using ordinary CSS styles such as color and op
|
||||
|
||||
### Animation state and styles
|
||||
|
||||
Use Angular's `state()` function to define different states to call at the end of each transition. This function takes two arguments: a unique name like `open` or `closed` and a `style()` function.
|
||||
Use Angular's <code>[state](api/animations/state)()</code> function to define different states to call at the end of each transition. This function takes two arguments: a unique name like `open` or `closed` and a `style()` function.
|
||||
|
||||
Use the `style()` function to define a set of styles to associate with a given state name. You must use [*camelCase*](guide/glossary#case-conventions) for style attributes that contain dashes, such as `backgroundColor` or wrap them in quotes, such as `'background-color'`.
|
||||
|
||||
Let's see how Angular's `state()` function works with the `style()` function to set CSS style attributes. In this code snippet, multiple style attributes are set at the same time for the state. In the `open` state, the button has a height of 200 pixels, an opacity of 1, and a yellow background color.
|
||||
Let's see how Angular's <code>[state](api/animations/state)()</code> function works with the `style()` function to set CSS style attributes. In this code snippet, multiple style attributes are set at the same time for the state. In the `open` state, the button has a height of 200 pixels, an opacity of 1, and a yellow background color.
|
||||
|
||||
<code-example path="animations/src/app/open-close.component.ts" header="src/app/open-close.component.ts" region="state1" language="typescript">
|
||||
</code-example>
|
||||
@@ -154,13 +154,13 @@ region="transition2">
|
||||
|
||||
<div class="alert is-helpful">
|
||||
|
||||
**Note:** Some additional notes on using styles within `state` and `transition` functions.
|
||||
**Note:** Some additional notes on using styles within [`state`](api/animations/state) and `transition` functions.
|
||||
|
||||
* Use `state()` to define styles that are applied at the end of each transition, they persist after the animation completes.
|
||||
* Use <code>[state](api/animations/state)()</code> to define styles that are applied at the end of each transition, they persist after the animation completes.
|
||||
|
||||
* Use `transition()` to define intermediate styles, which create the illusion of motion during the animation.
|
||||
|
||||
* When animations are disabled, `transition()` styles can be skipped, but `state()` styles can't.
|
||||
* When animations are disabled, `transition()` styles can be skipped, but <code>[state](api/animations/state)()</code> styles can't.
|
||||
|
||||
* Include multiple state pairs within the same `transition()` argument:<br/> `transition( 'on => off, off => void' )`.
|
||||
</div>
|
||||
@@ -231,7 +231,7 @@ region="trigger">
|
||||
|
||||
### Summary
|
||||
|
||||
You learned to add animation to a transition between two states, using `style()` and `state()` along with `animate()` for the timing.
|
||||
You learned to add animation to a transition between two states, using `style()` and <code>[state](api/animations/state)()</code> along with `animate()` for the timing.
|
||||
|
||||
Learn about more advanced features in Angular animations under the Animation section, beginning with advanced techniques in [transition and triggers](guide/transition-and-triggers).
|
||||
|
||||
|
||||
@@ -120,6 +120,10 @@ This section guides you through adding radio buttons to bind your color choice t
|
||||
|
||||
<code-example path="attribute-directives/src/app/app.component.ts" header="src/app/app.component.ts (class)" region="class"></code-example>
|
||||
|
||||
1. In `highlight.directive.ts`, revise `onMouseEnter` method so that it first tries to highlight with `appHighlight` and falls back to `red` if `appHighlight` is `undefined`.
|
||||
|
||||
<code-example path="attribute-directives/src/app/highlight.directive.3.ts" header="src/app/highlight.directive.ts (mouse-enter)" region="mouse-enter"></code-example>
|
||||
|
||||
1. Serve your application to verify that the user can choose the color with the radio buttons.
|
||||
|
||||
<div class="lightbox">
|
||||
@@ -136,7 +140,7 @@ This section guides you through configuring your application so the developer ca
|
||||
|
||||
<code-example path="attribute-directives/src/app/highlight.directive.ts" header="src/app/highlight.directive.ts (defaultColor)" region="defaultColor"></code-example>
|
||||
|
||||
1. Revise the directive's `onMouseEnter` so that it first tries to highlight with the `highlightColor`, then with the `defaultColor`, and falls back to `red` if both properties are `undefined`.
|
||||
1. Revise the directive's `onMouseEnter` so that it first tries to highlight with the `appHighlight`, then with the `defaultColor`, and falls back to `red` if both properties are `undefined`.
|
||||
|
||||
<code-example path="attribute-directives/src/app/highlight.directive.ts" header="src/app/highlight.directive.ts (mouse-enter)" region="mouse-enter"></code-example>
|
||||
|
||||
|
||||
@@ -23,39 +23,41 @@ Usually you give it one string, as in the following example:
|
||||
|
||||
<code-example path="component-styles/src/app/hero-app.component.ts" header="src/app/hero-app.component.ts"></code-example>
|
||||
|
||||
## Style scope
|
||||
## Component styling best practices
|
||||
|
||||
<div class="alert is-critical">
|
||||
<div class="alert is-helpful">
|
||||
|
||||
The styles specified in `@Component` metadata _apply only within the template of that component_.
|
||||
See [View Encapsulation](guide/view-encapsulation) for information on how Angular scopes styles to specific components.
|
||||
|
||||
</div>
|
||||
|
||||
They are _not inherited_ by any components nested within the template nor by any content projected into the component.
|
||||
You should consider the styles of a component to be private implementation details for that component. When consuming a common component, you should not override the component's styles any more than you should access the private members of a TypeScript class. While Angular's default style encapsulation prevents component styles from affecting other components, global styles affect all components on the page. This includes `::ng-deep`, which promotes a component style to a global style.
|
||||
|
||||
In this example, the `h1` style applies only to the `HeroAppComponent`,
|
||||
not to the nested `HeroMainComponent` nor to `<h1>` tags anywhere else in the application.
|
||||
### Authoring a component to support customization
|
||||
|
||||
This scoping restriction is a ***styling modularity feature***.
|
||||
As component author, you can explicitly design a component to accept customization in one of four different ways.
|
||||
|
||||
* Use the CSS class names and selectors that make the most sense in the context of each component.
|
||||
#### 1. Use CSS Custom Properties (recommended)
|
||||
|
||||
You can define a supported customization API for your component by defining its styles with CSS Custom Properties, alternatively known as CSS Variables. Anyone using your component can consume this API by defining values for these properties, customizing the final appearance of the component on the rendered page.
|
||||
|
||||
* Class names and selectors are local to the component and don't collide with
|
||||
classes and selectors used elsewhere in the application.
|
||||
While this requires defining a custom property for each customization point, it creates a clear API contract that works in all style encapsulation modes.
|
||||
|
||||
#### 2. Declare global CSS with @mixin
|
||||
|
||||
* Changes to styles elsewhere in the application don't affect the component's styles.
|
||||
While Angular's emulated style encapsulation prevents styles from escaping a component, it does not prevent global CSS from affecting the entire page. While component consumers should avoid directly overwriting the CSS internals of a component, you can offer a supported customization API via a CSS preprocessor like Sass.
|
||||
|
||||
For example, a component may offer one or more supported mixins to customize various aspects of the component's appearance. While this approach uses global styles in it’s implementation, it allows the component author to keep the mixins up to date with changes to the component's private DOM structure and CSS classes.
|
||||
|
||||
* Co-locate the CSS code of each component with the TypeScript and HTML code of the component,
|
||||
which leads to a neat and tidy project structure.
|
||||
#### 3. Customize with CSS ::part
|
||||
|
||||
If your component uses [Shadow DOM](https://developer.mozilla.org/docs/Web/Web_Components/Using_shadow_DOM), you can apply the `part` attribute to specify elements in your component's template. This allows consumers of the component to author arbitrary styles targeting those specific elements with [the `::part` pseudo-element](https://developer.mozilla.org/docs/Web/CSS/::part).
|
||||
|
||||
* Change or remove component CSS code without searching through the
|
||||
whole application to find where else the code is used.
|
||||
While this lets you limit the elements within your template that consumers can customize, it does not limit which CSS properties are customizable.
|
||||
|
||||
{@a special-selectors}
|
||||
#### 4. Provide a TypeScript API
|
||||
|
||||
You can define a TypeScript API for customizing styles, using template bindings to update CSS classes and styles. This is not recommended because the additional JavaScript cost of this style API incurs far more performance cost than CSS.
|
||||
|
||||
## Special selectors
|
||||
|
||||
@@ -255,7 +257,7 @@ See the [Styles configuration guide](guide/workspace-config#styles-and-scripts-c
|
||||
### Non-CSS style files
|
||||
|
||||
If you're building with the CLI,
|
||||
you can write style files in [sass](https://sass-lang.com/), or [less](http://lesscss.org/), and specify those files in the `@Component.styleUrls` metadata with the appropriate extensions (`.scss`, `.less`) as in the following example:
|
||||
you can write style files in [sass](https://sass-lang.com/), or [less](https://lesscss.org/), and specify those files in the `@Component.styleUrls` metadata with the appropriate extensions (`.scss`, `.less`) as in the following example:
|
||||
|
||||
<code-example>
|
||||
@Component({
|
||||
|
||||
@@ -572,7 +572,7 @@ For example, the `OnInit` interface has a hook method named `ngOnInit`.
|
||||
|
||||
Angular calls these hook methods in the following order:
|
||||
|
||||
* `ngOnChanges`: When an [input](#input)/[output](#output) binding value changes.
|
||||
* `ngOnChanges`: When an [input](#input) binding value changes.
|
||||
* `ngOnInit`: After the first `ngOnChanges`.
|
||||
* `ngDoCheck`: Developer's custom change detection.
|
||||
* `ngAfterContentInit`: After component content initialized.
|
||||
|
||||
@@ -74,7 +74,7 @@ To change the source locale of your project for the build, complete the followin
|
||||
|
||||
[GithubAngularAngularTreeMasterPackagesCommonLocales]: https://github.com/angular/angular/tree/master/packages/common/locales "angular/packages/common/locales | angular/angular | GitHub"
|
||||
|
||||
[LocStandardsIso6392]: http://www.loc.gov/standards/iso639-2 "ISO 639-2 Registration Authority | Library of Congress"
|
||||
[LocStandardsIso6392]: https://www.loc.gov/standards/iso639-2 "ISO 639-2 Registration Authority | Library of Congress"
|
||||
|
||||
[RfcEditorInfoBcp47]: https://www.rfc-editor.org/info/bcp47 "BCP 47 | RFC Editor"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ To prepare your project for translation, complete the following actions.
|
||||
|
||||
* Use the `i18n` attribute to mark text in component templates
|
||||
* Use the `i18n-` attribute to mark attribute text strings in component templates
|
||||
* Use the `$localize` tagged message string to mark test strings in component code
|
||||
* Use the `$localize` tagged message string to mark text strings in component code
|
||||
|
||||
## Mark text in component template
|
||||
|
||||
@@ -489,4 +489,4 @@ The following code example shows nested clauses based on the `gender` and `minut
|
||||
|
||||
<!-- end links -->
|
||||
|
||||
@reviewed 2021-10-13
|
||||
@reviewed 2021-12-13
|
||||
|
||||
@@ -35,7 +35,7 @@ The `package.json` is organized into two groups of packages:
|
||||
<div class="alert is-helpful">
|
||||
|
||||
**Library developers:** By default, the CLI command [`ng generate library`](cli/generate) creates a `package.json` for the new library. That `package.json` is used when publishing the library to npm.
|
||||
For more information, see the CLI wiki page [Library Support](https://github.com/angular/angular-cli/wiki/stories-create-library).
|
||||
For more information, see the CLI wiki page [Library Support](guide/creating-libraries).
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -114,9 +114,8 @@ Version | Status | Released | Active Ends | LTS Ends
|
||||
^13.0.0 | Active | Nov 04, 2021 | May 04, 2022 | May 04, 2023
|
||||
^12.0.0 | LTS | May 12, 2021 | Nov 12, 2021 | Nov 12, 2022
|
||||
^11.0.0 | LTS | Nov 11, 2020 | May 11, 2021 | May 11, 2022
|
||||
^10.0.0 | LTS | Jun 24, 2020 | Dec 24, 2020 | Dec 24, 2021
|
||||
|
||||
Angular versions v4, v5, v6, v7, v8, and v9 are no longer under support.
|
||||
Angular versions v2 to v10 are no longer under support.
|
||||
|
||||
### LTS fixes
|
||||
|
||||
|
||||
@@ -1195,7 +1195,7 @@ First, import the `BrowserAnimationsModule` and add it to the `imports` array:
|
||||
<code-example path="router/src/app/app.module.ts" header="src/app/app.module.ts (animations-module)" region="animations-module"></code-example>
|
||||
|
||||
Next, add a `data` object to the routes for `HeroListComponent` and `HeroDetailComponent`.
|
||||
Transitions are based on `states` and you use the `animation` data from the route to provide a named animation `state` for the transitions.
|
||||
Transitions are based on `states` and you use the `animation` data from the route to provide a named animation [`state`](api/animations/state) for the transitions.
|
||||
|
||||
<code-example path="router/src/app/heroes/heroes-routing.module.2.ts" header="src/app/heroes/heroes-routing.module.ts (animation data)"></code-example>
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ To get information from a route:
|
||||
<code-example path="router/src/app/heroes/hero-detail/hero-detail.component.ts" region="activated-route" header="In the component class (excerpt)">
|
||||
</code-example>
|
||||
|
||||
1. Update the `ngOnInit()` method to access the `ActivatedRoute` and track the `id` parameter:
|
||||
1. Update the `ngOnInit()` method to access the `ActivatedRoute` and track the `name` parameter:
|
||||
|
||||
<code-example header="In the component (excerpt)">
|
||||
ngOnInit() {
|
||||
|
||||
@@ -7,7 +7,7 @@ This chapter also explores multiple animation triggers, animation callbacks, and
|
||||
|
||||
## Predefined states and wildcard matching
|
||||
|
||||
In Angular, transition states can be defined explicitly through the `state()` function, or using the predefined `*` (wildcard) and `void` states.
|
||||
In Angular, transition states can be defined explicitly through the <code>[state](api/animations/state)()</code> function, or using the predefined `*` (wildcard) and `void` states.
|
||||
|
||||
### Wildcard state
|
||||
|
||||
@@ -119,7 +119,7 @@ In the component file, the `:enter` transition sets an initial opacity of 0, and
|
||||
<code-example path="animations/src/app/insert-remove.component.ts" header="src/app/insert-remove.component.ts" region="enter-leave-trigger" language="typescript">
|
||||
</code-example>
|
||||
|
||||
Note that this example doesn't need to use `state()`.
|
||||
Note that this example doesn't need to use <code>[state](api/animations/state)()</code>.
|
||||
|
||||
## :increment and :decrement in transitions
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ To check your application's version of Angular: From within your project directo
|
||||
{@a checking-version-angular}
|
||||
## Finding the current version of Angular
|
||||
|
||||
The most recent stable released version of Angular appears in the [Angular documentation](docs "Angular documentation") at the bottom of the left side navigation. For example, `stable (v5.2.9)`.
|
||||
The most recent stable released version of Angular appears in the [Angular documentation](docs "Angular documentation") at the bottom of the left side navigation. For example, `stable (v13.0.3)`.
|
||||
|
||||
You can also find the most current version of Angular by using the CLI command [`ng update`](cli/update). By default, [`ng update`](cli/update)(without additional arguments) lists the updates that are available to you.
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ For an example, see the [Angular Material][AngularMaterialMain] documentation.
|
||||
|
||||
### Library typings
|
||||
|
||||
Typicaly, library packages include typings in `.d.ts` files; see examples in `node_modules/@angular/material`.
|
||||
Typically, library packages include typings in `.d.ts` files; see examples in `node_modules/@angular/material`.
|
||||
If the package of your library does not include typings and your IDE complains, you might need to install the `@types/<lib_name>` package with the library.
|
||||
|
||||
For example, suppose you have a library named `d3`:
|
||||
@@ -126,13 +126,13 @@ For example, to use the [Bootstrap 4][GetbootstrapDocs40GettingStartedIntroducti
|
||||
After you import a library using the "scripts" array, do **not** import it using an import statement in your TypeScript code.
|
||||
The following code snippet is an example import statement.
|
||||
|
||||
<code-example format="typscript" language="typescript">
|
||||
<code-example format="typescript" language="typescript">
|
||||
|
||||
import * as $ from 'jquery';
|
||||
|
||||
</code-example>
|
||||
|
||||
If you inport it using import statements, you have two different copies of the library: one imported as a global library, and one imported as a module.
|
||||
If you import it using import statements, you have two different copies of the library: one imported as a global library, and one imported as a module.
|
||||
This is especially bad for libraries with plugins, like JQuery, because each copy includes different plugins.
|
||||
|
||||
Instead, run the `npm install @types/jquery` Angular CLI command to download typings for your library and then follow the library installation steps.
|
||||
@@ -200,4 +200,4 @@ If you do not add the interface for the script-defined extension, your IDE shows
|
||||
|
||||
<!-- end links -->
|
||||
|
||||
@reviewed 2021-11-01
|
||||
@reviewed 2022-01-05
|
||||
|
||||
@@ -6,7 +6,7 @@ The `Component`'s decorator provides the [`encapsulation`](api/core/Component#en
|
||||
|
||||
Choose from the following modes:
|
||||
|
||||
- `ViewEncapsulation.ShadowDom`, Angular uses the browser's built-in [Shadow DOM API](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM)) to enclose the component's view inside a ShadowRoot (used as the component's host element) and apply the provided styles in an isolated manner.
|
||||
- `ViewEncapsulation.ShadowDom`, Angular uses the browser's built-in [Shadow DOM API](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM) to enclose the component's view inside a ShadowRoot (used as the component's host element) and apply the provided styles in an isolated manner.
|
||||
|
||||
- `ViewEncapsulation.Emulated`, Angular modifies the component's CSS selectors so that they are only applied to the component's view and do not affect other elements in the application (_emulating_ Shadow DOM behavior). For more details, see [Inspecting generated CSS](guide/view-encapsulation#inspect-generated-css).
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
@@ -2,7 +2,7 @@
|
||||
@description
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2021 Google LLC. http://angular.io/license
|
||||
Copyright (c) 2010-2022 Google LLC. http://angular.io/license
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"picture": "daveshevitz.jpg",
|
||||
"bio": "Dave is a technical writer focused on creating a great documentation experience for Angular developers. When he isn't writing, he's toying with new technologies. His favorite motto is: 'What could possibly go wrong?'",
|
||||
"groups": ["Angular"],
|
||||
"lead": "igorminar"
|
||||
"lead": "jelbourn"
|
||||
},
|
||||
"ajitsinghkaler": {
|
||||
"name": "Ajit Singh",
|
||||
@@ -42,7 +42,7 @@
|
||||
"groups": ["Angular"],
|
||||
"lead": "dgp1130",
|
||||
"picture": "alan-agius4.jpg",
|
||||
"bio": "Angular CLI Member, Loves TypeScript, Build Tools, Food, Beer & Coffee :)"
|
||||
"bio": "Angular CLI Member, Loves TypeScript, Build Tools, Food, Beer & Coffee :)"
|
||||
},
|
||||
"alisaduncan": {
|
||||
"name": "Alisa Duncan",
|
||||
@@ -100,6 +100,14 @@
|
||||
"bio": "Natalia started working professionally as a web software developer in the early 2000s. She now works in the role of technical lead and software/solutions architect. She is a public speaker, content creator, GDE for Angular and Web Technologies, Microsoft MVP Award (Developer Technologies), and a mentor with the RoadtoGDE program.",
|
||||
"groups": ["GDE"]
|
||||
},
|
||||
"AnkitSharma-007": {
|
||||
"name": "Ankit Sharma",
|
||||
"picture": "ankit-sharma.jpg",
|
||||
"twitter": "ankitsharma_007",
|
||||
"website": "https://ankitsharmablogs.com",
|
||||
"bio": "SDE III @cisco | GDE for Angular | Microsoft MVP | Author | Speaker | Passionate Programmer",
|
||||
"groups": ["GDE"]
|
||||
},
|
||||
"armenvardanyan95": {
|
||||
"name": "Armen Vardanyan",
|
||||
"picture": "armen-vardanyan.jpg",
|
||||
@@ -134,7 +142,7 @@
|
||||
"picture": "aristeidis.jpg",
|
||||
"twitter": "abampakos",
|
||||
"website": "https://medium.com/@abampakos",
|
||||
"bio": "Aristeidis is a web development team lead at Plex-Earth working with Angular. He is a co-organizer of the Angular Athens meetup and the author of Learning Angular - 3rd Edition and Angular Projects - 2nd Edition books. He is also a senior Angular instructor at Code.Hub where he teaches the Angular framework to other developers.",
|
||||
"bio": "Aristeidis is a web development team lead at Plex-Earth working with Angular. He is the author of two books about Angular: Learning Angular - 3rd Edition and Angular Projects - 2nd Edition. He also works as an Angular senior tech instructor at Code.Hub where he teaches the Angular framework to other developers and professionals.",
|
||||
"groups": ["GDE"]
|
||||
},
|
||||
"bbrennan": {
|
||||
@@ -175,7 +183,6 @@
|
||||
},
|
||||
"cexbrayat": {
|
||||
"name": "Cédric Exbrayat",
|
||||
"mentor": "petebacondarwin",
|
||||
"groups": ["Collaborators"],
|
||||
"picture": "cexbrayat.jpg",
|
||||
"bio": "Author of `Become a ninja with Angular (2+)` https://books.ninja-squad.com/angular - Angular trainer and @Ninja-Squad co-founder"
|
||||
@@ -233,12 +240,6 @@
|
||||
"groups": ["Angular"],
|
||||
"lead": "jelbourn"
|
||||
},
|
||||
"danieltre23": {
|
||||
"name": "Daniel Trevino",
|
||||
"picture": "danieltre23.jpg",
|
||||
"bio": "Daniel is a Software Engineer Intern at Google, loves to learn new things, write code and listen to music.",
|
||||
"groups": ["Angular"]
|
||||
},
|
||||
"danwahlin": {
|
||||
"name": "Dan Wahlin",
|
||||
"picture": "danwahlin.jpg",
|
||||
@@ -372,21 +373,7 @@
|
||||
"website": "https://github.com/gkalpak",
|
||||
"bio": "George is a Software Engineer with a passion for chess, robotics and automating stuff. He has a strong need to know how things work (so if you already know, he'd love to have a talk with you). He has been a member of the AngularJS team since 2014. When not doing geeky stuff, he is probably trying to convince his wife and kids to apply programming principles in real life. (Or is it the other way around?)",
|
||||
"groups": ["Angular"],
|
||||
"lead": "igorminar"
|
||||
},
|
||||
"gregmagolan": {
|
||||
"name": "Greg Magolan",
|
||||
"groups": ["Angular"],
|
||||
"lead": "dgp1130",
|
||||
"picture": "gregmagolan.jpg",
|
||||
"bio": "Building great software with Angular and Node.js."
|
||||
},
|
||||
"igorminar": {
|
||||
"name": "Igor Minar",
|
||||
"picture": "igor-minar.jpg",
|
||||
"twitter": "IgorMinar",
|
||||
"bio": "Igor is a software engineer at Google. He is a lead on the Angular project, practitioner of test driven development, open source enthusiast, hacker. In his free time, Igor enjoys spending time with his wife and two kids, doing outdoor activities (including but not limited to sports, gardening and building retaining walls).",
|
||||
"groups": ["Angular"]
|
||||
"lead": "jelbourn"
|
||||
},
|
||||
"jbedard": {
|
||||
"name": "Jason Bedard",
|
||||
@@ -416,8 +403,7 @@
|
||||
"twitter": "jelbourn",
|
||||
"website": "https://plus.google.com/+JeremyElbourn/",
|
||||
"bio": "Angular Material Team Lead. FE Engineer @ Google specializing in AngularJS, component design, and the cleanest of code.",
|
||||
"groups": ["Angular"],
|
||||
"lead": "igorminar"
|
||||
"groups": ["Angular"]
|
||||
},
|
||||
"jeremywilken": {
|
||||
"name": "Jeremy Wilken",
|
||||
@@ -438,7 +424,7 @@
|
||||
"jiali": {
|
||||
"name": "Jia Li",
|
||||
"groups": ["Collaborators"],
|
||||
"mentor": "igorminar",
|
||||
"mentor": "jelbourn",
|
||||
"picture": "JiaLiPassion.jpg",
|
||||
"twitter": "Jialipassion",
|
||||
"website": "https://github.com/JiaLiPassion",
|
||||
@@ -479,8 +465,7 @@
|
||||
"name": "Joey Perrott",
|
||||
"picture": "josephperrott.jpeg",
|
||||
"twitter": "joeyperrott",
|
||||
"groups": ["Angular"],
|
||||
"lead": "igorminar"
|
||||
"groups": ["Angular"]
|
||||
},
|
||||
"josmar-crwdstffng": {
|
||||
"name": "Joe Martin",
|
||||
@@ -718,15 +703,6 @@
|
||||
"bio": "Pascal is a software engineer, author and Google Developer Expert for the Angular team. He loves contributing to open source and is the creator of the popular angular-translate module. In his spare time he’s fiddling with EDM production.",
|
||||
"groups": ["GDE"]
|
||||
},
|
||||
"petebacondarwin": {
|
||||
"name": "Pete Bacon Darwin",
|
||||
"picture": "pete.jpg",
|
||||
"twitter": "petebd",
|
||||
"website": "https://www.bacondarwin.com/",
|
||||
"bio": "AngularJS for JS Team Lead. Pete has been working on the core team since 2012 and became the team lead for the AngularJS for JS branch in November 2014. He has co-authored a book on AngularJS and regularly talks about and teaches Angular.",
|
||||
"groups": ["Angular"],
|
||||
"lead": "igorminar"
|
||||
},
|
||||
"phenomnomnominal": {
|
||||
"name": "Craig Spence",
|
||||
"picture": "craig-spence.jpg",
|
||||
@@ -992,6 +968,14 @@
|
||||
"bio": "GDE (Google Developer Expert) Angular and Web Technologies, GDG Salvador organizer, passionate about technology and active in communities with a focus on web development, including Angular, JavaScript, HTML5, CSS3, Workflow, web performance, security and Internet of things. Participates in events organization, speaker at conferences in Brazil and other countries and contributes to several open source projects.",
|
||||
"groups": ["GDE"]
|
||||
},
|
||||
"yharaskrik": {
|
||||
"name": "Jay Bell",
|
||||
"picture": "jaybell.jpg",
|
||||
"twitter": "jaycooperbell",
|
||||
"website": "tech.trellis.org",
|
||||
"bio": "Jay is the CTO and Co-Founder of a Social Enterprise in Canada that is using Angular and technology to empower global collective impact in the non-profit and charity industries. He is an avid contributor to Nx and loves Angular, NgRx and Nest. Jay loves to share knowledge he has learned from figuring out problems (complex or otherwise) so that others can solve them easier the next time.",
|
||||
"groups": ["GDE"]
|
||||
},
|
||||
"yjaaidi": {
|
||||
"name": "Younes Jaaidi",
|
||||
"picture": "younes.jpg",
|
||||
|
||||
@@ -129,6 +129,12 @@
|
||||
"logo": "",
|
||||
"title": "NativeScript",
|
||||
"url": "https://docs.nativescript.org/angular/start/introduction"
|
||||
},
|
||||
"angular-miniprogram": {
|
||||
"desc": "MiniProgram Platform for Angular.",
|
||||
"logo": "",
|
||||
"title": "MiniProgram",
|
||||
"url": "https://github.com/wszgrcy/angular-miniprogram"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -519,6 +525,11 @@
|
||||
"desc": "Taiga UI is fully-treeshakable Angular UI Kit consisting of multiple base libraries and several add-ons. We have 130+ components, 100+ directives, dozens of tokens, utils and tools. They are easily customizable and well engineered.",
|
||||
"title": "Taiga UI",
|
||||
"url": "https://taiga-ui.dev"
|
||||
},
|
||||
"coreui-angular": {
|
||||
"desc": "Open Source UI Components library for creating modern, beautiful, and responsive applications in half the time with high-performing and easy-to-customize UI components.",
|
||||
"title": "CoreUI for Angular",
|
||||
"url": "https://coreui.io/angular"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -754,6 +765,11 @@
|
||||
"title": "Webucator",
|
||||
"url": "https://www.webucator.com/webdev-training/angular-training"
|
||||
},
|
||||
"decoded-frontend": {
|
||||
"desc": "YouTube Channel about Angular & Web Development",
|
||||
"title": "Decoded Frontend",
|
||||
"url": "https://www.youtube.com/DecodedFrontend"
|
||||
},
|
||||
"-acceleb": {
|
||||
"desc": "Customized, Instructor-Led Angular Training",
|
||||
"title": "Accelebrate",
|
||||
|
||||
@@ -26,13 +26,18 @@ A best practice is to run your project locally before you deploy it. To run your
|
||||
<img src="generated/images/guide/start/download-project.png" alt="Download the stackblitz project">
|
||||
</div>
|
||||
|
||||
|
||||
1. Unzip the archive change directory to the newly created project. For example:
|
||||
1. Unzip the archive and change directory to the newly created project. For example:
|
||||
|
||||
```sh
|
||||
cd angular-ynqttp
|
||||
```
|
||||
|
||||
|
||||
1. To download and install npm packages, use the following npm CLI command:
|
||||
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
1. Use the following CLI command to run your application locally:
|
||||
|
||||
```sh
|
||||
|
||||
+20
-20
@@ -18,7 +18,7 @@
|
||||
"build-local": "yarn ~~build",
|
||||
"prebuild-local-ci": "yarn setup-local-ci",
|
||||
"build-local-ci": "yarn ~~build --progress=false",
|
||||
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 481eb4544",
|
||||
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js febee7484",
|
||||
"lint": "yarn check-env && yarn docs-lint && ng lint && yarn example-lint && yarn tools-lint && yarn security-lint",
|
||||
"test": "yarn check-env && ng test",
|
||||
"pree2e": "yarn check-env && yarn update-webdriver",
|
||||
@@ -85,39 +85,39 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "13.0.2",
|
||||
"@angular/cdk": "13.0.2",
|
||||
"@angular/common": "13.0.2",
|
||||
"@angular/compiler": "13.0.2",
|
||||
"@angular/core": "13.0.2",
|
||||
"@angular/elements": "13.0.2",
|
||||
"@angular/forms": "13.0.2",
|
||||
"@angular/material": "13.0.2",
|
||||
"@angular/platform-browser": "13.0.2",
|
||||
"@angular/platform-browser-dynamic": "13.0.2",
|
||||
"@angular/router": "13.0.2",
|
||||
"@angular/service-worker": "13.0.2",
|
||||
"@angular/animations": "13.1.2",
|
||||
"@angular/cdk": "13.1.2",
|
||||
"@angular/common": "13.1.2",
|
||||
"@angular/compiler": "13.1.2",
|
||||
"@angular/core": "13.1.2",
|
||||
"@angular/elements": "13.1.2",
|
||||
"@angular/forms": "13.1.2",
|
||||
"@angular/material": "13.1.2",
|
||||
"@angular/platform-browser": "13.1.2",
|
||||
"@angular/platform-browser-dynamic": "13.1.2",
|
||||
"@angular/router": "13.1.2",
|
||||
"@angular/service-worker": "13.1.2",
|
||||
"rxjs": "~7.4.0",
|
||||
"safevalues": "^0.1.8",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "13.0.3",
|
||||
"@angular-devkit/build-angular": "13.1.3",
|
||||
"@angular-eslint/builder": "^13.0.0",
|
||||
"@angular-eslint/eslint-plugin": "^13.0.0",
|
||||
"@angular-eslint/eslint-plugin-template": "^13.0.0",
|
||||
"@angular-eslint/template-parser": "^13.0.0",
|
||||
"@angular/cli": "13.0.3",
|
||||
"@angular/compiler-cli": "13.0.2",
|
||||
"@angular/cli": "13.1.3",
|
||||
"@angular/compiler-cli": "13.1.2",
|
||||
"@types/jasmine": "~3.10.0",
|
||||
"@types/lunr": "^2.3.3",
|
||||
"@types/node": "^12.7.9",
|
||||
"@types/stemmer": "^1.0.2",
|
||||
"@types/trusted-types": "^2.0.2",
|
||||
"@types/xregexp": "^4.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.3.1",
|
||||
"@typescript-eslint/parser": "5.3.1",
|
||||
"@typescript-eslint/eslint-plugin": "5.9.1",
|
||||
"@typescript-eslint/parser": "5.9.1",
|
||||
"@yarnpkg/lockfile": "^1.1.0",
|
||||
"archiver": "^5.3.0",
|
||||
"assert": "^2.0.0",
|
||||
@@ -152,7 +152,7 @@
|
||||
"json5": "^2.2.0",
|
||||
"karma": "~6.3.2",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage": "~2.0.3",
|
||||
"karma-coverage": "~2.1.0",
|
||||
"karma-jasmine": "~4.0.0",
|
||||
"karma-jasmine-html-reporter": "~1.7.0",
|
||||
"light-server": "^2.9.1",
|
||||
@@ -168,7 +168,7 @@
|
||||
"remark-html": "^13.0.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"semver": "^7.3.5",
|
||||
"shelljs": "^0.8.4",
|
||||
"shelljs": "^0.8.5",
|
||||
"stemmer": "^2.0.0",
|
||||
"timezone-mock": "^1.1.3",
|
||||
"tree-kill": "^1.1.0",
|
||||
|
||||
@@ -10,7 +10,7 @@ const {green, red} = require('chalk');
|
||||
const fetch = require('node-fetch');
|
||||
const {join} = require('path');
|
||||
|
||||
/** The full path to the contributons.json fie. */
|
||||
/** The full path to the contributors.json file. */
|
||||
const contributorsFilePath = join(__dirname, '../content/marketing/contributors.json');
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<footer class="no-print">
|
||||
<aio-footer>
|
||||
<p>
|
||||
Powered by Google ©2010-2021.
|
||||
Powered by Google ©2010-2022.
|
||||
Code licensed under an <a href="license" title="License text">MIT-style License</a>.
|
||||
Documentation licensed under <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
|
||||
</p>
|
||||
|
||||
@@ -59,16 +59,12 @@ export class CodeTabsComponent implements OnInit, AfterViewInit {
|
||||
const contentElem = this.content.nativeElement;
|
||||
const codeExamples = Array.from(contentElem.querySelectorAll('code-pane'));
|
||||
|
||||
// Remove DOM nodes that are no longer needed.
|
||||
contentElem.textContent = '';
|
||||
|
||||
for (const tabContent of codeExamples) {
|
||||
this.tabs.push(this.getTabInfo(tabContent));
|
||||
}
|
||||
|
||||
// Remove DOM nodes that are no longer needed.
|
||||
//
|
||||
// NOTE:
|
||||
// In IE11, doing this also empties the `<code-pane>` nodes captured in `codeExamples` ¯\_(ツ)_/¯
|
||||
// Only remove the unnecessary nodes after having captured the `<code-pane>` contents.
|
||||
contentElem.textContent = '';
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
|
||||
@@ -103,10 +103,9 @@ export class DocViewerComponent implements OnDestroy {
|
||||
const toc = document.createElement('aio-toc');
|
||||
toc.className = 'embedded';
|
||||
titleEl.parentNode.insertBefore(toc, titleEl.nextSibling);
|
||||
} else if (!needsToc && embeddedToc && embeddedToc.parentNode !== null) {
|
||||
} else if (!needsToc && embeddedToc) {
|
||||
// Remove the embedded Toc if it's there and not needed.
|
||||
// We cannot use ChildNode.remove() because of IE11
|
||||
embeddedToc.parentNode.removeChild(embeddedToc);
|
||||
embeddedToc.remove();
|
||||
}
|
||||
|
||||
return () => {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Super-powered by Google ©2010-2021.
|
||||
Super-powered by Google ©2010-2022.
|
||||
</p>
|
||||
<p>
|
||||
Code licensed under an <a href="license" title="License text">MIT-style License</a>.
|
||||
|
||||
@@ -13,7 +13,7 @@ import { unwrapHtmlForSink } from 'safevalues';
|
||||
* the following attributes:
|
||||
*
|
||||
* * `xmlns="http://www.w3.org/2000/svg"`
|
||||
* * `focusable="false"` (disable IE11 default behavior to make SVGs focusable)
|
||||
* * `focusable="false"` (the default)
|
||||
* * `height="100%"` (the default)
|
||||
* * `width="100%"` (the default)
|
||||
* * `preserveAspectRatio="xMidYMid meet"` (the default)
|
||||
|
||||
@@ -67,10 +67,10 @@ export class TocService {
|
||||
div.innerHTML = unwrapHtmlForSink(fromInnerHTML(heading));
|
||||
|
||||
// Remove any `.github-links` or `.header-link` elements (along with their content).
|
||||
querySelectorAll(div, '.github-links, .header-link').forEach(removeNode);
|
||||
div.querySelectorAll('.github-links, .header-link').forEach(link => link.remove());
|
||||
|
||||
// Remove any remaining `a` elements (but keep their content).
|
||||
querySelectorAll(div, 'a').forEach(anchorLink => {
|
||||
div.querySelectorAll('a').forEach(anchorLink => {
|
||||
// We want to keep the content of this anchor, so move it into its parent.
|
||||
const parent = anchorLink.parentNode as Node;
|
||||
while (anchorLink.childNodes.length) {
|
||||
@@ -78,7 +78,7 @@ export class TocService {
|
||||
}
|
||||
|
||||
// Now, remove the anchor.
|
||||
removeNode(anchorLink);
|
||||
anchorLink.remove();
|
||||
});
|
||||
|
||||
return {
|
||||
@@ -90,11 +90,10 @@ export class TocService {
|
||||
}
|
||||
|
||||
private findTocHeadings(docElement: Element): HTMLHeadingElement[] {
|
||||
// const headings = querySelectorAll(docElement, 'h1,h2,h3');
|
||||
const headings = querySelectorAll<HTMLHeadingElement>(docElement, 'h1,h2,h3');
|
||||
const headings = docElement.querySelectorAll<HTMLHeadingElement>('h1,h2,h3');
|
||||
const skipNoTocHeadings = (heading: HTMLHeadingElement) => !/(?:no-toc|notoc)/i.test(heading.className);
|
||||
|
||||
return headings.filter(skipNoTocHeadings);
|
||||
return Array.prototype.filter.call(headings, skipNoTocHeadings);
|
||||
}
|
||||
|
||||
private resetScrollSpyInfo() {
|
||||
@@ -128,27 +127,3 @@ export class TocService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Helpers
|
||||
function querySelectorAll<K extends keyof HTMLElementTagNameMap>(
|
||||
parent: Element,
|
||||
selector: K
|
||||
): HTMLElementTagNameMap[K][];
|
||||
function querySelectorAll<K extends keyof SVGElementTagNameMap>(
|
||||
parent: Element,
|
||||
selector: K
|
||||
): SVGElementTagNameMap[K][];
|
||||
function querySelectorAll<E extends Element = Element>(parent: Element, selector: string): E[];
|
||||
function querySelectorAll(parent: Element, selector: string) {
|
||||
// Wrap the `NodeList` as a regular `Array` to have access to array methods.
|
||||
// NOTE: IE11 does not even support some methods of `NodeList`, such as
|
||||
// [NodeList#forEach()](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach).
|
||||
return Array.from(parent.querySelectorAll(selector));
|
||||
}
|
||||
|
||||
function removeNode(node: Node): void {
|
||||
if (node.parentNode !== null) {
|
||||
// We cannot use `Node.remove()` because of IE11.
|
||||
node.parentNode.removeChild(node);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
}
|
||||
|
||||
.sidenav-content {
|
||||
display: block; // This is required for browsers that do not recognize `<main>` as a block
|
||||
// element (such as IE11).
|
||||
min-height: 100vh;
|
||||
padding: 80px 3rem 2rem;
|
||||
max-width: 50em;
|
||||
|
||||
@@ -5,21 +5,22 @@ footer {
|
||||
position: relative;
|
||||
@include mixins.line-height(24);
|
||||
flex: 1;
|
||||
padding: 48px;
|
||||
padding: 48px 25px;
|
||||
z-index: 0;
|
||||
font-weight: 300;
|
||||
|
||||
aio-footer {
|
||||
display: block;
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
overflow: auto;
|
||||
|
||||
& > * {
|
||||
max-width: 50em;
|
||||
}
|
||||
|
||||
.footer-block {
|
||||
margin: 0 24px;
|
||||
vertical-align: top;
|
||||
margin: 0 0.3rem;
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -63,17 +64,17 @@ footer {
|
||||
}
|
||||
|
||||
div.grid-fluid {
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
text-align: left;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
$grid-gap: 24px;
|
||||
gap: $grid-gap;
|
||||
margin: 0 auto 40px;
|
||||
justify-content: center;
|
||||
|
||||
ul {
|
||||
list-style-position: inside;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
@@ -82,20 +83,24 @@ footer {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 32rem) {
|
||||
flex-direction: column;
|
||||
@media (max-width: 45rem) {
|
||||
grid-template-columns: repeat(2, calc(50% - (#{$grid-gap}/2)));
|
||||
|
||||
.footer-block {
|
||||
margin: 8px 24px;
|
||||
margin: 1.5rem 2.4rem 0.8rem 20%;
|
||||
}
|
||||
}
|
||||
|
||||
@media not all and (min-resolution:.001dpcm) { // hack to detect safari
|
||||
// tweak needed as safari handles rem based media queries differently
|
||||
@media (max-width: 50rem) {
|
||||
flex-direction: column;
|
||||
@media (max-width: 25rem) {
|
||||
.footer-block {
|
||||
margin-left: 0.3rem;
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 20rem) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,8 +101,6 @@ aio-code {
|
||||
top: -7px;
|
||||
right: -19px;
|
||||
padding: 0;
|
||||
overflow: visible; // This is required for the button to be displayed correctly in IE11.
|
||||
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
@@ -121,11 +119,11 @@ aio-code {
|
||||
:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(pre) {
|
||||
> code {
|
||||
border-radius: 4px;
|
||||
padding: 0 4px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
&:not(a) > code {
|
||||
padding: 4px;
|
||||
&:is(a) > code {
|
||||
@include mixins.line-height(24);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
.feature-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around; // This is required for browsers that do not support
|
||||
// `space-evenly` (such as IE11).
|
||||
justify-content: space-evenly;
|
||||
|
||||
@media (max-width: 1057px) {
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Create a `CustomEvent` (even on browsers where `CustomEvent` is not a constructor).
|
||||
*/
|
||||
export function createCustomEvent(doc: Document, name: string, detail: any): CustomEvent {
|
||||
const bubbles = false;
|
||||
const cancelable = false;
|
||||
|
||||
// On IE11, `CustomEvent` is not a constructor.
|
||||
if (typeof CustomEvent !== 'function') {
|
||||
const event = doc.createEvent('CustomEvent');
|
||||
event.initCustomEvent(name, bubbles, cancelable, detail);
|
||||
return event;
|
||||
}
|
||||
|
||||
return new CustomEvent(name, {bubbles, cancelable, detail});
|
||||
}
|
||||
@@ -58,7 +58,7 @@ describe('Api pages', () => {
|
||||
});
|
||||
|
||||
it('should not show a "Properties" section if there are only internal properties', async () => {
|
||||
await page.navigateTo('api/forms/FormControl');
|
||||
await page.navigateTo('api/forms/AsyncValidator');
|
||||
expect(await page.getSection('instance-properties').isPresent()).toBe(false);
|
||||
});
|
||||
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~13.0.0-next.0",
|
||||
"@angular/common": "~13.0.0-next.0",
|
||||
"@angular/compiler": "~13.0.0-next.0",
|
||||
"@angular/core": "~13.0.0-next.0",
|
||||
"@angular/forms": "~13.0.0-next.0",
|
||||
"@angular/platform-browser": "~13.0.0-next.0",
|
||||
"@angular/platform-browser-dynamic": "~13.0.0-next.0",
|
||||
"@angular/router": "~13.0.0-next.0",
|
||||
"@angular/animations": "~13.1.0",
|
||||
"@angular/common": "~13.1.0",
|
||||
"@angular/compiler": "~13.1.0",
|
||||
"@angular/core": "~13.1.0",
|
||||
"@angular/forms": "~13.1.0",
|
||||
"@angular/platform-browser": "~13.1.0",
|
||||
"@angular/platform-browser-dynamic": "~13.1.0",
|
||||
"@angular/router": "~13.1.0",
|
||||
"angular": "1.8.0",
|
||||
"angular-in-memory-web-api": "~0.11.0",
|
||||
"angular-route": "1.8.0",
|
||||
@@ -29,9 +29,9 @@
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~13.0.0-rc.3",
|
||||
"@angular/cli": "~13.0.0-rc.3",
|
||||
"@angular/compiler-cli": "~13.0.0-next.0",
|
||||
"@angular-devkit/build-angular": "~13.1.0",
|
||||
"@angular/cli": "~13.1.0",
|
||||
"@angular/compiler-cli": "~13.1.0",
|
||||
"@types/angular": "1.7.3",
|
||||
"@types/angular-route": "1.7.1",
|
||||
"@types/jasmine": "~3.10.0",
|
||||
|
||||
@@ -13,23 +13,23 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~13.0.0-next.0",
|
||||
"@angular/common": "~13.0.0-next.0",
|
||||
"@angular/compiler": "~13.0.0-next.0",
|
||||
"@angular/core": "~13.0.0-next.0",
|
||||
"@angular/forms": "~13.0.0-next.0",
|
||||
"@angular/platform-browser": "~13.0.0-next.0",
|
||||
"@angular/platform-browser-dynamic": "~13.0.0-next.0",
|
||||
"@angular/router": "~13.0.0-next.0",
|
||||
"@angular/animations": "~13.1.0",
|
||||
"@angular/common": "~13.1.0",
|
||||
"@angular/compiler": "~13.1.0",
|
||||
"@angular/core": "~13.1.0",
|
||||
"@angular/forms": "~13.1.0",
|
||||
"@angular/platform-browser": "~13.1.0",
|
||||
"@angular/platform-browser-dynamic": "~13.1.0",
|
||||
"@angular/router": "~13.1.0",
|
||||
"angular-in-memory-web-api": "~0.11.0",
|
||||
"rxjs": "~7.4.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~13.0.0-rc.3",
|
||||
"@angular/cli": "~13.0.0-rc.3",
|
||||
"@angular/compiler-cli": "~13.0.0-next.0",
|
||||
"@angular-devkit/build-angular": "~13.1.0",
|
||||
"@angular/cli": "~13.1.0",
|
||||
"@angular/compiler-cli": "~13.1.0",
|
||||
"@types/jasmine": "~3.10.0",
|
||||
"@types/node": "^12.11.1",
|
||||
"copyfiles": "^2.4.1",
|
||||
|
||||
@@ -13,24 +13,24 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~13.0.0-next.0",
|
||||
"@angular/common": "~13.0.0-next.0",
|
||||
"@angular/compiler": "~13.0.0-next.0",
|
||||
"@angular/core": "~13.0.0-next.0",
|
||||
"@angular/elements": "~13.0.0-next.0",
|
||||
"@angular/forms": "~13.0.0-next.0",
|
||||
"@angular/platform-browser": "~13.0.0-next.0",
|
||||
"@angular/platform-browser-dynamic": "~13.0.0-next.0",
|
||||
"@angular/router": "~13.0.0-next.0",
|
||||
"@angular/animations": "~13.1.0",
|
||||
"@angular/common": "~13.1.0",
|
||||
"@angular/compiler": "~13.1.0",
|
||||
"@angular/core": "~13.1.0",
|
||||
"@angular/elements": "~13.1.0",
|
||||
"@angular/forms": "~13.1.0",
|
||||
"@angular/platform-browser": "~13.1.0",
|
||||
"@angular/platform-browser-dynamic": "~13.1.0",
|
||||
"@angular/router": "~13.1.0",
|
||||
"angular-in-memory-web-api": "~0.11.0",
|
||||
"rxjs": "~7.4.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~13.0.0-rc.3",
|
||||
"@angular/cli": "~13.0.0-rc.3",
|
||||
"@angular/compiler-cli": "~13.0.0-next.0",
|
||||
"@angular-devkit/build-angular": "~13.1.0",
|
||||
"@angular/cli": "~13.1.0",
|
||||
"@angular/compiler-cli": "~13.1.0",
|
||||
"@types/jasmine": "~3.10.0",
|
||||
"@types/node": "^12.11.1",
|
||||
"jasmine-core": "~3.10.0",
|
||||
|
||||
@@ -16,24 +16,24 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~13.0.0-next.0",
|
||||
"@angular/common": "~13.0.0-next.0",
|
||||
"@angular/compiler": "~13.0.0-next.0",
|
||||
"@angular/core": "~13.0.0-next.0",
|
||||
"@angular/forms": "~13.0.0-next.0",
|
||||
"@angular/localize": "~13.0.0-next.0",
|
||||
"@angular/platform-browser": "~13.0.0-next.0",
|
||||
"@angular/platform-browser-dynamic": "~13.0.0-next.0",
|
||||
"@angular/router": "~13.0.0-next.0",
|
||||
"@angular/animations": "~13.1.0",
|
||||
"@angular/common": "~13.1.0",
|
||||
"@angular/compiler": "~13.1.0",
|
||||
"@angular/core": "~13.1.0",
|
||||
"@angular/forms": "~13.1.0",
|
||||
"@angular/localize": "~13.1.0",
|
||||
"@angular/platform-browser": "~13.1.0",
|
||||
"@angular/platform-browser-dynamic": "~13.1.0",
|
||||
"@angular/router": "~13.1.0",
|
||||
"angular-in-memory-web-api": "~0.11.0",
|
||||
"rxjs": "~7.4.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~13.0.0-rc.3",
|
||||
"@angular/cli": "~13.0.0-rc.3",
|
||||
"@angular/compiler-cli": "~13.0.0-next.0",
|
||||
"@angular-devkit/build-angular": "~13.1.0",
|
||||
"@angular/cli": "~13.1.0",
|
||||
"@angular/compiler-cli": "~13.1.0",
|
||||
"@types/jasmine": "~3.10.0",
|
||||
"@types/node": "^12.11.1",
|
||||
"jasmine-core": "~3.10.0",
|
||||
|
||||
@@ -13,24 +13,24 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~13.0.0-next.0",
|
||||
"@angular/common": "~13.0.0-next.0",
|
||||
"@angular/compiler": "~13.0.0-next.0",
|
||||
"@angular/core": "~13.0.0-next.0",
|
||||
"@angular/forms": "~13.0.0-next.0",
|
||||
"@angular/platform-browser": "~13.0.0-next.0",
|
||||
"@angular/platform-browser-dynamic": "~13.0.0-next.0",
|
||||
"@angular/router": "~13.0.0-next.0",
|
||||
"@angular/service-worker": "~13.0.0-next.0",
|
||||
"@angular/animations": "~13.1.0",
|
||||
"@angular/common": "~13.1.0",
|
||||
"@angular/compiler": "~13.1.0",
|
||||
"@angular/core": "~13.1.0",
|
||||
"@angular/forms": "~13.1.0",
|
||||
"@angular/platform-browser": "~13.1.0",
|
||||
"@angular/platform-browser-dynamic": "~13.1.0",
|
||||
"@angular/router": "~13.1.0",
|
||||
"@angular/service-worker": "~13.1.0",
|
||||
"angular-in-memory-web-api": "~0.11.0",
|
||||
"rxjs": "~7.4.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~13.0.0-rc.3",
|
||||
"@angular/cli": "~13.0.0-rc.3",
|
||||
"@angular/compiler-cli": "~13.0.0-next.0",
|
||||
"@angular-devkit/build-angular": "~13.1.0",
|
||||
"@angular/cli": "~13.1.0",
|
||||
"@angular/compiler-cli": "~13.1.0",
|
||||
"@types/jasmine": "~3.10.0",
|
||||
"@types/node": "^12.11.1",
|
||||
"jasmine-core": "~3.10.0",
|
||||
|
||||
@@ -25,15 +25,15 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~13.0.0-next.0",
|
||||
"@angular/common": "~13.0.0-next.0",
|
||||
"@angular/compiler": "~13.0.0-next.0",
|
||||
"@angular/core": "~13.0.0-next.0",
|
||||
"@angular/forms": "~13.0.0-next.0",
|
||||
"@angular/platform-browser": "~13.0.0-next.0",
|
||||
"@angular/platform-browser-dynamic": "~13.0.0-next.0",
|
||||
"@angular/router": "~13.0.0-next.0",
|
||||
"@angular/upgrade": "~13.0.0-next.0",
|
||||
"@angular/animations": "~13.1.0",
|
||||
"@angular/common": "~13.1.0",
|
||||
"@angular/compiler": "~13.1.0",
|
||||
"@angular/core": "~13.1.0",
|
||||
"@angular/forms": "~13.1.0",
|
||||
"@angular/platform-browser": "~13.1.0",
|
||||
"@angular/platform-browser-dynamic": "~13.1.0",
|
||||
"@angular/router": "~13.1.0",
|
||||
"@angular/upgrade": "~13.1.0",
|
||||
"core-js": "^2.5.4",
|
||||
"rxjs": "~7.4.0",
|
||||
"systemjs": "~0.19.39",
|
||||
@@ -42,7 +42,7 @@
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/compiler-cli": "~13.0.0-next.0",
|
||||
"@angular/compiler-cli": "~13.1.0",
|
||||
"@types/angular": "1.7.3",
|
||||
"@types/angular-animate": "1.5.10",
|
||||
"@types/angular-mocks": "1.7.0",
|
||||
|
||||
@@ -17,16 +17,16 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~13.0.0-next.0",
|
||||
"@angular/common": "~13.0.0-next.0",
|
||||
"@angular/compiler": "~13.0.0-next.0",
|
||||
"@angular/core": "~13.0.0-next.0",
|
||||
"@angular/forms": "~13.0.0-next.0",
|
||||
"@angular/platform-browser": "~13.0.0-next.0",
|
||||
"@angular/platform-browser-dynamic": "~13.0.0-next.0",
|
||||
"@angular/platform-server": "~13.0.0-next.0",
|
||||
"@angular/router": "~13.0.0-next.0",
|
||||
"@nguniversal/express-engine": "~13.0.0-rc.0",
|
||||
"@angular/animations": "~13.1.0",
|
||||
"@angular/common": "~13.1.0",
|
||||
"@angular/compiler": "~13.1.0",
|
||||
"@angular/core": "~13.1.0",
|
||||
"@angular/forms": "~13.1.0",
|
||||
"@angular/platform-browser": "~13.1.0",
|
||||
"@angular/platform-browser-dynamic": "~13.1.0",
|
||||
"@angular/platform-server": "~13.1.0",
|
||||
"@angular/router": "~13.1.0",
|
||||
"@nguniversal/express-engine": "~13.0.0",
|
||||
"angular-in-memory-web-api": "~0.11.0",
|
||||
"express": "^4.15.2",
|
||||
"rxjs": "~7.4.0",
|
||||
@@ -34,10 +34,10 @@
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~13.0.0-rc.3",
|
||||
"@angular/cli": "~13.0.0-rc.3",
|
||||
"@angular/compiler-cli": "~13.0.0-next.0",
|
||||
"@nguniversal/builders": "~13.0.0-rc.0",
|
||||
"@angular-devkit/build-angular": "~13.1.0",
|
||||
"@angular/cli": "~13.1.0",
|
||||
"@angular/compiler-cli": "~13.1.0",
|
||||
"@nguniversal/builders": "~13.0.0",
|
||||
"@types/express": "^4.17.8",
|
||||
"@types/jasmine": "~3.10.0",
|
||||
"@types/node": "^12.11.1",
|
||||
|
||||
@@ -21,20 +21,20 @@
|
||||
"license": "MIT",
|
||||
"repository": {},
|
||||
"dependencies": {
|
||||
"@angular/animations": "~13.0.0-next.0",
|
||||
"@angular/common": "~13.0.0-next.0",
|
||||
"@angular/compiler": "~13.0.0-next.0",
|
||||
"@angular/core": "~13.0.0-next.0",
|
||||
"@angular/elements": "~13.0.0-next.0",
|
||||
"@angular/forms": "~13.0.0-next.0",
|
||||
"@angular/localize": "~13.0.0-next.0",
|
||||
"@angular/platform-browser": "~13.0.0-next.0",
|
||||
"@angular/platform-browser-dynamic": "~13.0.0-next.0",
|
||||
"@angular/platform-server": "~13.0.0-next.0",
|
||||
"@angular/router": "~13.0.0-next.0",
|
||||
"@angular/service-worker": "~13.0.0-next.0",
|
||||
"@angular/upgrade": "~13.0.0-next.0",
|
||||
"@nguniversal/express-engine": "~13.0.0-rc.0",
|
||||
"@angular/animations": "~13.1.0",
|
||||
"@angular/common": "~13.1.0",
|
||||
"@angular/compiler": "~13.1.0",
|
||||
"@angular/core": "~13.1.0",
|
||||
"@angular/elements": "~13.1.0",
|
||||
"@angular/forms": "~13.1.0",
|
||||
"@angular/localize": "~13.1.0",
|
||||
"@angular/platform-browser": "~13.1.0",
|
||||
"@angular/platform-browser-dynamic": "~13.1.0",
|
||||
"@angular/platform-server": "~13.1.0",
|
||||
"@angular/router": "~13.1.0",
|
||||
"@angular/service-worker": "~13.1.0",
|
||||
"@angular/upgrade": "~13.1.0",
|
||||
"@nguniversal/express-engine": "~13.0.0",
|
||||
"angular": "1.8.0",
|
||||
"angular-in-memory-web-api": "~0.11.0",
|
||||
"angular-route": "1.8.0",
|
||||
@@ -47,10 +47,10 @@
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~13.0.0-rc.3",
|
||||
"@angular/cli": "~13.0.0-rc.3",
|
||||
"@angular/compiler-cli": "~13.0.0-next.0",
|
||||
"@nguniversal/builders": "~13.0.0-rc.0",
|
||||
"@angular-devkit/build-angular": "~13.1.0",
|
||||
"@angular/cli": "~13.1.0",
|
||||
"@angular/compiler-cli": "~13.1.0",
|
||||
"@nguniversal/builders": "~13.0.0",
|
||||
"@types/angular": "1.7.3",
|
||||
"@types/angular-animate": "1.5.10",
|
||||
"@types/angular-mocks": "1.7.0",
|
||||
|
||||
+1091
-1248
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ describe('toId filter', function() {
|
||||
it('should be called "toId"', function() { expect(filter.name).toEqual('toId'); });
|
||||
|
||||
it('should convert a string to make it appropriate for use as an HTML id', function() {
|
||||
expect(filter.process('This is a big string with €bad#characaters¢\nAnd even NewLines'))
|
||||
.toEqual('This-is-a-big-string-with--bad-characaters--And-even-NewLines');
|
||||
expect(filter.process('This is a big string with €bad#characters¢\nAnd even NewLines'))
|
||||
.toEqual('This-is-a-big-string-with--bad-characters--And-even-NewLines');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
+851
-690
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -3,7 +3,7 @@
|
||||
Note: this doc is for developing Angular, it is _not_ public
|
||||
documentation for building an Angular application with Bazel.
|
||||
|
||||
The Bazel build tool (http://bazel.build) provides fast, reliable
|
||||
The Bazel build tool (https://bazel.build) provides fast, reliable
|
||||
incremental builds. We plan to migrate Angular's build scripts to
|
||||
Bazel.
|
||||
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ using `yarn link` build a local project with the created artifacts.
|
||||
|
||||
This can be done by running:
|
||||
```sh
|
||||
yarn ng-dev build-and-link <path-to-local-project-root>
|
||||
yarn ng-dev misc build-and-link <path-to-local-project-root>
|
||||
```
|
||||
|
||||
## Formatting your source code
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
## API Report File for "angular-srcs"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
// @public
|
||||
export const enum RuntimeErrorCode {
|
||||
// (undocumented)
|
||||
INVALID_PIPE_ARGUMENT = 2100,
|
||||
// (undocumented)
|
||||
PARENT_NG_SWITCH_NOT_FOUND = 2000
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
@@ -10,6 +10,23 @@ export interface BazelAndG3Options {
|
||||
generateDeepReexports?: boolean;
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum DiagnosticCategoryLabel {
|
||||
Error = "error",
|
||||
Suppress = "suppress",
|
||||
Warning = "warning"
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface DiagnosticOptions {
|
||||
extendedDiagnostics?: {
|
||||
defaultCategory?: DiagnosticCategoryLabel;
|
||||
checks?: {
|
||||
[Name in ExtendedTemplateDiagnosticName]?: DiagnosticCategoryLabel;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface I18nOptions {
|
||||
enableI18nLegacyMessageIdFormat?: boolean;
|
||||
|
||||
@@ -11,6 +11,12 @@ export enum ErrorCode {
|
||||
COMPONENT_MISSING_TEMPLATE = 2001,
|
||||
COMPONENT_RESOURCE_NOT_FOUND = 2008,
|
||||
// (undocumented)
|
||||
CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES = 4003,
|
||||
// (undocumented)
|
||||
CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL = 4004,
|
||||
// (undocumented)
|
||||
CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK = 4005,
|
||||
// (undocumented)
|
||||
CONFIG_FLAT_MODULE_NO_INDEX = 4001,
|
||||
// (undocumented)
|
||||
CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK = 4002,
|
||||
@@ -31,6 +37,7 @@ export enum ErrorCode {
|
||||
DUPLICATE_VARIABLE_DECLARATION = 8006,
|
||||
HOST_BINDING_PARSE_ERROR = 5001,
|
||||
IMPORT_CYCLE_DETECTED = 3003,
|
||||
IMPORT_GENERATION_FAILURE = 3004,
|
||||
INJECTABLE_DUPLICATE_PROV = 9001,
|
||||
INLINE_TCB_REQUIRED = 8900,
|
||||
INLINE_TYPE_CTOR_REQUIRED = 8901,
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
## API Report File for "angular-srcs"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
// @public
|
||||
export enum ExtendedTemplateDiagnosticName {
|
||||
// (undocumented)
|
||||
INVALID_BANANA_IN_BOX = "invalidBananaInBox",
|
||||
// (undocumented)
|
||||
NULLISH_COALESCING_NOT_NULLABLE = "nullishCoalescingNotNullable"
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
@@ -0,0 +1,79 @@
|
||||
## API Report File for "angular-srcs"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
// @public
|
||||
export function formatRuntimeError<T = RuntimeErrorCode>(code: T, message: string): string;
|
||||
|
||||
// @public (undocumented)
|
||||
export class RuntimeError<T = RuntimeErrorCode> extends Error {
|
||||
constructor(code: T, message: string);
|
||||
// (undocumented)
|
||||
code: T;
|
||||
}
|
||||
|
||||
// @public
|
||||
export const enum RuntimeErrorCode {
|
||||
// (undocumented)
|
||||
ALREADY_DESTROYED_PLATFORM = 404,
|
||||
// (undocumented)
|
||||
ASYNC_INITIALIZERS_STILL_RUNNING = 405,
|
||||
// (undocumented)
|
||||
BOOTSTRAP_COMPONENTS_NOT_FOUND = 403,
|
||||
// (undocumented)
|
||||
CYCLIC_DI_DEPENDENCY = -200,
|
||||
// (undocumented)
|
||||
ERROR_HANDLER_NOT_FOUND = 402,
|
||||
// (undocumented)
|
||||
EXPORT_NOT_FOUND = -301,
|
||||
// (undocumented)
|
||||
EXPRESSION_CHANGED_AFTER_CHECKED = -100,
|
||||
// (undocumented)
|
||||
INJECTOR_ALREADY_DESTROYED = 205,
|
||||
// (undocumented)
|
||||
INVALID_DIFFER_INPUT = 900,
|
||||
// (undocumented)
|
||||
INVALID_EVENT_BINDING = 306,
|
||||
// (undocumented)
|
||||
INVALID_FACTORY_DEPENDENCY = 202,
|
||||
// (undocumented)
|
||||
INVALID_I18N_STRUCTURE = 700,
|
||||
// (undocumented)
|
||||
INVALID_INHERITANCE = 903,
|
||||
// (undocumented)
|
||||
INVALID_INJECTION_TOKEN = 204,
|
||||
// (undocumented)
|
||||
MISSING_INJECTION_CONTEXT = 203,
|
||||
// (undocumented)
|
||||
MULTIPLE_COMPONENTS_MATCH = -300,
|
||||
// (undocumented)
|
||||
MULTIPLE_PLATFORMS = 400,
|
||||
// (undocumented)
|
||||
NO_SUPPORTING_DIFFER_FACTORY = 901,
|
||||
// (undocumented)
|
||||
PIPE_NOT_FOUND = -302,
|
||||
// (undocumented)
|
||||
PLATFORM_NOT_FOUND = 401,
|
||||
// (undocumented)
|
||||
PROVIDER_NOT_FOUND = -201,
|
||||
// (undocumented)
|
||||
RECURSIVE_APPLICATION_REF_TICK = 101,
|
||||
// (undocumented)
|
||||
TEMPLATE_STRUCTURE_ERROR = 305,
|
||||
// (undocumented)
|
||||
UNKNOWN_BINDING = 303,
|
||||
// (undocumented)
|
||||
UNKNOWN_ELEMENT = 304,
|
||||
// (undocumented)
|
||||
UNSAFE_VALUE_IN_RESOURCE_URL = 904,
|
||||
// (undocumented)
|
||||
UNSAFE_VALUE_IN_SCRIPT = 905,
|
||||
// (undocumented)
|
||||
VIEW_ALREADY_ATTACHED = 902
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
@@ -0,0 +1,19 @@
|
||||
## API Report File for "angular-srcs"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
// @public
|
||||
export const enum RuntimeErrorCode {
|
||||
// (undocumented)
|
||||
MISSING_CONTROL = 1001,
|
||||
// (undocumented)
|
||||
MISSING_CONTROL_VALUE = 1002,
|
||||
// (undocumented)
|
||||
NO_CONTROLS = 1000
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
@@ -200,10 +200,12 @@ export class DefaultValueAccessor extends BaseControlValueAccessor implements Co
|
||||
}
|
||||
|
||||
// @public
|
||||
export class EmailValidator implements Validator {
|
||||
set email(value: boolean | string);
|
||||
registerOnValidatorChange(fn: () => void): void;
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
export class EmailValidator extends AbstractValidatorDirective {
|
||||
email: boolean | string;
|
||||
|
||||
// (undocumented)
|
||||
enabled(input: boolean): boolean;
|
||||
|
||||
// (undocumented)
|
||||
static ɵdir: i0.ɵɵDirectiveDeclaration<EmailValidator, "[email][formControlName],[email][formControl],[email][ngModel]", never, { "email": "email"; }, {}, never>;
|
||||
// (undocumented)
|
||||
|
||||
@@ -2,24 +2,24 @@
|
||||
"aio": {
|
||||
"master": {
|
||||
"uncompressed": {
|
||||
"runtime": 4436,
|
||||
"main": 460179,
|
||||
"runtime": 4330,
|
||||
"main": 458531,
|
||||
"polyfills": 37123,
|
||||
"styles": 70149,
|
||||
"light-theme": 77369,
|
||||
"dark-theme": 77549
|
||||
"styles": 69863,
|
||||
"light-theme": 77232,
|
||||
"dark-theme": 77356
|
||||
}
|
||||
}
|
||||
},
|
||||
"aio-local": {
|
||||
"master": {
|
||||
"uncompressed": {
|
||||
"runtime": 4436,
|
||||
"main": 458469,
|
||||
"runtime": 4330,
|
||||
"main": 457719,
|
||||
"polyfills": 37271,
|
||||
"styles": 70149,
|
||||
"light-theme": 77369,
|
||||
"dark-theme": 77549
|
||||
"styles": 69863,
|
||||
"light-theme": 77232,
|
||||
"dark-theme": 77356
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
"master": {
|
||||
"uncompressed": {
|
||||
"runtime": 1083,
|
||||
"main": 138071,
|
||||
"polyfills": 36964
|
||||
"main": 139416,
|
||||
"polyfills": 37226
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -15,7 +15,7 @@
|
||||
"main": "TODO(i): temporarily increase the payload size limit from 17597 - this needs to be investigate further what caused the increase.",
|
||||
"main": "Likely there is a missing PURE annotation https://github.com/angular/angular/pull/43344",
|
||||
"main": "Tracking issue: https://github.com/angular/angular/issues/43568",
|
||||
"main": 20409,
|
||||
"main": 20378,
|
||||
"polyfills": 37250
|
||||
}
|
||||
}
|
||||
@@ -24,8 +24,8 @@
|
||||
"master": {
|
||||
"uncompressed": {
|
||||
"runtime": 1105,
|
||||
"main": 144185,
|
||||
"polyfills": 36939
|
||||
"main": 145132,
|
||||
"polyfills": 37248
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -33,7 +33,7 @@
|
||||
"master": {
|
||||
"uncompressed": {
|
||||
"runtime": 929,
|
||||
"main": 136770,
|
||||
"main": 137712,
|
||||
"polyfills": 37933
|
||||
}
|
||||
}
|
||||
@@ -41,9 +41,9 @@
|
||||
"cli-hello-world-lazy": {
|
||||
"master": {
|
||||
"uncompressed": {
|
||||
"runtime": 2843,
|
||||
"main": 230506,
|
||||
"polyfills": 37064,
|
||||
"runtime": 2835,
|
||||
"main": 231989,
|
||||
"polyfills": 37244,
|
||||
"src_app_lazy_lazy_module_ts": 795
|
||||
}
|
||||
}
|
||||
@@ -52,8 +52,8 @@
|
||||
"master": {
|
||||
"uncompressed": {
|
||||
"runtime": 1063,
|
||||
"main": 162474,
|
||||
"polyfills": 36975
|
||||
"main": 162121,
|
||||
"polyfills": 37206
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
# Copyright Google LLC All Rights Reserved.
|
||||
#
|
||||
# Use of this source code is governed by an MIT-style license that can be
|
||||
# found in the LICENSE file at https://angular.io/license
|
||||
"""Angular integration testing
|
||||
"""
|
||||
|
||||
load("//tools/npm_integration_test:npm_integration_test.bzl", "npm_integration_test")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")
|
||||
|
||||
# The @npm packages at the root node_modules are used by integration tests
|
||||
# with `file:../../node_modules/foobar` references
|
||||
NPM_PACKAGE_ARCHIVES = [
|
||||
"@angular/animations-12",
|
||||
"@angular/common-12",
|
||||
"@angular/core-12",
|
||||
"@angular/forms-12",
|
||||
"@angular/platform-browser-12",
|
||||
"@angular/platform-browser-dynamic-12",
|
||||
"@angular/platform-server-12",
|
||||
"@angular/router-12",
|
||||
"@babel/core",
|
||||
"@rollup/plugin-babel",
|
||||
"@rollup/plugin-node-resolve",
|
||||
"@rollup/plugin-commonjs",
|
||||
"check-side-effects",
|
||||
"core-js",
|
||||
"google-closure-compiler",
|
||||
"jasmine",
|
||||
"typescript",
|
||||
"rxjs",
|
||||
"systemjs",
|
||||
"tsickle",
|
||||
"tslib",
|
||||
"protractor",
|
||||
"terser",
|
||||
"puppeteer",
|
||||
"rollup",
|
||||
"rollup-plugin-sourcemaps",
|
||||
"webdriver-manager",
|
||||
"@angular/cli",
|
||||
"@angular-devkit/build-angular",
|
||||
"@bazel/bazelisk",
|
||||
"@types/jasmine",
|
||||
"@types/jasminewd2",
|
||||
"@types/node",
|
||||
]
|
||||
|
||||
# The generated npm packages should ALWAYS be replaced in integration tests
|
||||
# so we pass them to the `check_npm_packages` attribute of npm_integration_test
|
||||
FRAMEWORK_PACKAGES = [
|
||||
"@angular/animations",
|
||||
"@angular/bazel",
|
||||
"@angular/benchpress",
|
||||
"@angular/common",
|
||||
"@angular/compiler",
|
||||
"@angular/compiler-cli",
|
||||
"@angular/core",
|
||||
"@angular/elements",
|
||||
"@angular/forms",
|
||||
"@angular/language-service",
|
||||
"@angular/localize",
|
||||
"@angular/platform-browser",
|
||||
"@angular/platform-browser-dynamic",
|
||||
"@angular/platform-server",
|
||||
"@angular/router",
|
||||
"@angular/service-worker",
|
||||
"@angular/upgrade",
|
||||
"zone.js",
|
||||
]
|
||||
|
||||
def npm_package_archives():
|
||||
"""Function to generate pkg_tar definitions for WORKSPACE yarn_install manual_build_file_contents"""
|
||||
npm_packages_to_archive = NPM_PACKAGE_ARCHIVES
|
||||
result = """load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
"""
|
||||
for name in npm_packages_to_archive:
|
||||
label_name = _npm_package_archive_label(name)
|
||||
last_segment_name = name.split("/")[-1]
|
||||
result += """pkg_tar(
|
||||
name = "{label_name}",
|
||||
srcs = ["//{name}:{last_segment_name}__all_files"],
|
||||
extension = "tar.gz",
|
||||
strip_prefix = "/external/npm/node_modules/{name}",
|
||||
# should not be built unless it is a dependency of another rule
|
||||
tags = ["manual"],
|
||||
)
|
||||
""".format(name = name, label_name = label_name, last_segment_name = last_segment_name)
|
||||
return result
|
||||
|
||||
def _npm_package_archive_label(package_name):
|
||||
return package_name.replace("/", "_").replace("@", "") + "_archive"
|
||||
|
||||
def _angular_integration_test(name, **kwargs):
|
||||
"Set defaults for the npm_integration_test common to the angular repo"
|
||||
payload_size_tracking = kwargs.pop("payload_size_tracking", [])
|
||||
pinned_npm_packages = kwargs.pop("pinned_npm_packages", [])
|
||||
use_view_engine_packages = kwargs.pop("use_view_engine_packages", [])
|
||||
data = [
|
||||
# We need the yarn_bin & yarn_files available at runtime
|
||||
"@nodejs//:yarn_bin",
|
||||
"@nodejs//:yarn_files",
|
||||
]
|
||||
|
||||
# By default run `yarn install` followed by `yarn test` using
|
||||
# the bazel managed hermetic version of yarn inside
|
||||
DEFAULT_COMMANDS = [
|
||||
"patch-package-json",
|
||||
# Workaround https://github.com/yarnpkg/yarn/issues/2165
|
||||
# Yarn will cache file://dist URIs and not update Angular code
|
||||
"rm -rf ./.yarn_local_cache",
|
||||
"mkdir .yarn_local_cache",
|
||||
"$(rootpath @nodejs//:yarn_bin) install --cache-folder ./.yarn_local_cache",
|
||||
"$(rootpath @nodejs//:yarn_bin) test",
|
||||
]
|
||||
|
||||
commands = kwargs.pop("commands", [])
|
||||
if commands == "default":
|
||||
commands = DEFAULT_COMMANDS
|
||||
elif commands == "payload_size_tracking":
|
||||
commands = DEFAULT_COMMANDS + [
|
||||
"$(rootpath @nodejs//:yarn_bin) build",
|
||||
"$(rootpath //:scripts/ci/track-payload-size.sh) %s dist/*.js true ${RUNFILES}/angular/$(rootpath //goldens:size-tracking/integration-payloads.json)" % name,
|
||||
]
|
||||
data = data + [
|
||||
"//goldens:size-tracking/integration-payloads.json",
|
||||
"//:scripts/ci/track-payload-size.sh",
|
||||
"//:scripts/ci/payload-size.sh",
|
||||
"//:scripts/ci/payload-size.js",
|
||||
]
|
||||
|
||||
# Complete list of npm packages to override in the test's package.json file mapped to
|
||||
# tgz archive to use for the replacement. This is the full list for all integration
|
||||
# tests. Any given integration does not need to use all of these packages.
|
||||
npm_packages = {}
|
||||
for pkg in NPM_PACKAGE_ARCHIVES:
|
||||
if pkg not in pinned_npm_packages:
|
||||
npm_packages["@npm//:" + _npm_package_archive_label(pkg)] = pkg
|
||||
for pkg in FRAMEWORK_PACKAGES:
|
||||
# If the generated Angular framework package is listed in the `use_view_engine_packages`
|
||||
# list, we will not use the local-built NPM package, but instead map to the
|
||||
# corresponding View Engine v12.x package from the `@npm//` workspace.
|
||||
if pkg in use_view_engine_packages:
|
||||
npm_packages["@npm//:" + _npm_package_archive_label("%s-12" % pkg)] = pkg
|
||||
else:
|
||||
last_segment_name = pkg.split("/")[-1]
|
||||
npm_packages["//packages/%s:npm_package_archive" % last_segment_name] = pkg
|
||||
|
||||
npm_integration_test(
|
||||
name = name + "_test",
|
||||
check_npm_packages = FRAMEWORK_PACKAGES,
|
||||
commands = commands,
|
||||
npm_packages = npm_packages,
|
||||
tags = kwargs.pop("tags", []) + [
|
||||
# `integration` tag is used for filtering out these tests from the normal
|
||||
# developer workflow
|
||||
"integration",
|
||||
# Integration do not work inside of a sandbox as they may run host applications such
|
||||
# as chrome (which is run by ng) that require access to files outside of the sandbox.
|
||||
"no-sandbox",
|
||||
# Remote doesn't work as it needs network access right now
|
||||
"no-remote-exec",
|
||||
],
|
||||
data = kwargs.pop("data", []) + data,
|
||||
# 15-minute timeout
|
||||
timeout = "long",
|
||||
# Tells bazel that this test should be allocated a large amount of memory.
|
||||
# See https://docs.bazel.build/versions/2.0.0/be/common-definitions.html#common-attributes-tests.
|
||||
size = "enormous",
|
||||
**kwargs
|
||||
)
|
||||
|
||||
def angular_integration_test(name, **kwargs):
|
||||
"Sets up the integration test target based on the test folder name"
|
||||
|
||||
# Note: We copy the `package.json` file to the `bazel-bin` as otherwise
|
||||
# the actual source file `package.json` file would be modified on Windows.
|
||||
copy_to_bin(
|
||||
name = "%s_package_json" % name,
|
||||
srcs = ["%s/package.json" % name],
|
||||
)
|
||||
|
||||
native.filegroup(
|
||||
name = "_%s_sources" % name,
|
||||
srcs = ["%s_package_json" % name] + native.glob(
|
||||
include = ["%s/**" % name],
|
||||
exclude = [
|
||||
"%s/package.json",
|
||||
"%s/node_modules/**" % name,
|
||||
"%s/.yarn_local_cache/**" % name,
|
||||
],
|
||||
),
|
||||
)
|
||||
_angular_integration_test(
|
||||
name = name,
|
||||
test_files = kwargs.pop("test_files", "_%s_sources" % name),
|
||||
**kwargs
|
||||
)
|
||||
@@ -2,6 +2,6 @@ load("//integration:index.bzl", "ng_integration_test")
|
||||
|
||||
ng_integration_test(
|
||||
name = "test",
|
||||
commands = "payload_size_tracking",
|
||||
setup_chromium = True,
|
||||
track_payload_size = "cli-hello-world-ivy-compat",
|
||||
)
|
||||
|
||||
@@ -2,6 +2,6 @@ load("//integration:index.bzl", "ng_integration_test")
|
||||
|
||||
ng_integration_test(
|
||||
name = "test",
|
||||
commands = "payload_size_tracking",
|
||||
setup_chromium = True,
|
||||
track_payload_size = "cli-hello-world-ivy-i18n",
|
||||
)
|
||||
|
||||
@@ -2,6 +2,6 @@ load("//integration:index.bzl", "ng_integration_test")
|
||||
|
||||
ng_integration_test(
|
||||
name = "test",
|
||||
commands = "payload_size_tracking",
|
||||
setup_chromium = True,
|
||||
track_payload_size = "cli-hello-world-ivy-minimal",
|
||||
)
|
||||
|
||||
@@ -2,6 +2,6 @@ load("//integration:index.bzl", "ng_integration_test")
|
||||
|
||||
ng_integration_test(
|
||||
name = "test",
|
||||
commands = "payload_size_tracking",
|
||||
setup_chromium = True,
|
||||
track_payload_size = "cli-hello-world-lazy",
|
||||
)
|
||||
|
||||
@@ -2,6 +2,6 @@ load("//integration:index.bzl", "ng_integration_test")
|
||||
|
||||
ng_integration_test(
|
||||
name = "test",
|
||||
commands = "payload_size_tracking",
|
||||
setup_chromium = True,
|
||||
track_payload_size = "cli-hello-world",
|
||||
)
|
||||
|
||||
@@ -2,6 +2,6 @@ load("//integration:index.bzl", "ng_integration_test")
|
||||
|
||||
ng_integration_test(
|
||||
name = "test",
|
||||
commands = "payload_size_tracking",
|
||||
setup_chromium = True,
|
||||
track_payload_size = "forms",
|
||||
)
|
||||
|
||||
@@ -2,10 +2,10 @@ load("//integration:index.bzl", "ng_integration_test")
|
||||
|
||||
ng_integration_test(
|
||||
name = "test",
|
||||
# TODO: Re-enable the payload_size_tracking command:
|
||||
# TODO: Re-enable size-tracking:
|
||||
# We should define ngDevMode to false in Closure, but --define only works in the global scope.
|
||||
# With ngDevMode not being set to false, this size tracking test provides little value but a lot of
|
||||
# headache to continue updating the size.
|
||||
# commands = "payload_size_tracking",
|
||||
# track_payload_size = "hello_world_closure",
|
||||
setup_chromium = True,
|
||||
)
|
||||
|
||||
@@ -38,6 +38,7 @@ def _ng_integration_test(name, setup_chromium = False, **kwargs):
|
||||
use_view_engine_packages = kwargs.pop("use_view_engine_packages", [])
|
||||
toolchains = kwargs.pop("toolchains", [])
|
||||
environment = kwargs.pop("environment", {})
|
||||
track_payload_size = kwargs.pop("track_payload_size", None)
|
||||
data = kwargs.pop("data", [])
|
||||
|
||||
data += [
|
||||
@@ -56,18 +57,16 @@ def _ng_integration_test(name, setup_chromium = False, **kwargs):
|
||||
|
||||
# By default run `yarn install` followed by `yarn test` using the tools linked
|
||||
# into the integration tests (using the `tool_mappings` attribute).
|
||||
commands = [
|
||||
commands = kwargs.pop("commands", [
|
||||
"yarn install --cache-folder ./.yarn_local_cache",
|
||||
"yarn test",
|
||||
]
|
||||
])
|
||||
|
||||
command_type = kwargs.pop("commands", "default")
|
||||
|
||||
if command_type == "payload_size_tracking":
|
||||
if track_payload_size:
|
||||
commands += [
|
||||
"yarn build",
|
||||
# TODO: Replace the track payload-size script with a RBE and Windows-compatible script.
|
||||
"$(rootpath //:scripts/ci/track-payload-size.sh) %s dist/*.js true $${RUNFILES}/angular/$(rootpath //goldens:size-tracking/integration-payloads.json)" % name,
|
||||
"$(rootpath //:scripts/ci/track-payload-size.sh) %s 'dist/*.js' true $${RUNFILES}/angular/$(rootpath //goldens:size-tracking/integration-payloads.json)" % track_payload_size,
|
||||
]
|
||||
data += [
|
||||
"//goldens:size-tracking/integration-payloads.json",
|
||||
|
||||
@@ -12,12 +12,6 @@ import {HelloWorldComponent, HelloWorldOnpushComponent, HelloWorldShadowComponen
|
||||
HelloWorldShadowComponent,
|
||||
TestCardComponent,
|
||||
],
|
||||
entryComponents: [
|
||||
HelloWorldComponent,
|
||||
HelloWorldOnpushComponent,
|
||||
HelloWorldShadowComponent,
|
||||
TestCardComponent,
|
||||
],
|
||||
imports: [BrowserModule],
|
||||
})
|
||||
export class AppModule {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver")
|
||||
load("//tools:defaults.bzl", "app_bundle", "ng_module", "ts_devserver")
|
||||
load("@npm//@angular/dev-infra-private/bazel/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
|
||||
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
|
||||
|
||||
@@ -18,7 +18,7 @@ ng_module(
|
||||
],
|
||||
)
|
||||
|
||||
ng_rollup_bundle(
|
||||
app_bundle(
|
||||
name = "bundle",
|
||||
entry_point = ":index_aot.ts",
|
||||
deps = [
|
||||
@@ -32,7 +32,7 @@ ts_devserver(
|
||||
bootstrap = ["//packages/zone.js/bundles:zone.umd.js"],
|
||||
port = 4200,
|
||||
static_files = ["index.html"],
|
||||
deps = [":bundle.min_debug.js"],
|
||||
deps = [":bundle.debug.min.js"],
|
||||
)
|
||||
|
||||
benchmark_test(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver", "ts_library")
|
||||
load("//tools:defaults.bzl", "app_bundle", "ng_module", "ts_devserver", "ts_library")
|
||||
load("@npm//@angular/dev-infra-private/bazel/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
|
||||
|
||||
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
|
||||
@@ -31,7 +31,7 @@ ts_library(
|
||||
],
|
||||
)
|
||||
|
||||
ng_rollup_bundle(
|
||||
app_bundle(
|
||||
name = "bundle",
|
||||
entry_point = ":index_aot.ts",
|
||||
deps = [
|
||||
@@ -45,7 +45,7 @@ ts_devserver(
|
||||
bootstrap = ["//packages/zone.js/bundles:zone.umd.js"],
|
||||
port = 4200,
|
||||
static_files = ["index.html"],
|
||||
deps = [":bundle.min_debug.js"],
|
||||
deps = [":bundle.debug.min.js"],
|
||||
)
|
||||
|
||||
ts_devserver(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver")
|
||||
load("//tools:defaults.bzl", "app_bundle", "ng_module", "ts_devserver")
|
||||
load("@npm//@angular/dev-infra-private/bazel/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
|
||||
|
||||
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
|
||||
@@ -15,7 +15,7 @@ ng_module(
|
||||
],
|
||||
)
|
||||
|
||||
ng_rollup_bundle(
|
||||
app_bundle(
|
||||
name = "bundle",
|
||||
entry_point = ":index_aot.ts",
|
||||
deps = [
|
||||
@@ -29,7 +29,7 @@ ts_devserver(
|
||||
bootstrap = ["//packages/zone.js/bundles:zone.umd.js"],
|
||||
port = 4200,
|
||||
static_files = ["index.html"],
|
||||
deps = [":bundle.min_debug.js"],
|
||||
deps = [":bundle.debug.min.js"],
|
||||
)
|
||||
|
||||
benchmark_test(
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
*/
|
||||
|
||||
import {bindAction, profile} from '../../util';
|
||||
import {buildTable, emptyTable} from '../util';
|
||||
import {buildTable, emptyTable, initTableUtils} from '../util';
|
||||
|
||||
import {TableComponent} from './table';
|
||||
|
||||
let table: TableComponent;
|
||||
@@ -27,6 +28,8 @@ function init() {
|
||||
rootEl.textContent = '';
|
||||
table = new TableComponent(rootEl);
|
||||
|
||||
initTableUtils();
|
||||
|
||||
bindAction('#destroyDom', destroyDom);
|
||||
bindAction('#createDom', createDom);
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
*/
|
||||
|
||||
import {bindAction, profile} from '../../util';
|
||||
import {buildTable, emptyTable} from '../util';
|
||||
import {buildTable, emptyTable, initTableUtils} from '../util';
|
||||
|
||||
import {TableComponent} from './table';
|
||||
|
||||
let table: TableComponent;
|
||||
@@ -25,6 +26,8 @@ function noop() {}
|
||||
function init() {
|
||||
table = new TableComponent(document.querySelector('largetable'));
|
||||
|
||||
initTableUtils();
|
||||
|
||||
bindAction('#destroyDom', destroyDom);
|
||||
bindAction('#createDom', createDom);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver")
|
||||
load("//tools:defaults.bzl", "app_bundle", "ng_module", "ts_devserver")
|
||||
load("@npm//@angular/dev-infra-private/bazel/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
|
||||
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
|
||||
|
||||
@@ -21,7 +21,7 @@ ng_module(
|
||||
],
|
||||
)
|
||||
|
||||
ng_rollup_bundle(
|
||||
app_bundle(
|
||||
name = "bundle",
|
||||
entry_point = ":index_aot.ts",
|
||||
deps = [
|
||||
@@ -35,7 +35,7 @@ ts_devserver(
|
||||
bootstrap = ["//packages/zone.js/bundles:zone.umd.js"],
|
||||
port = 4200,
|
||||
static_files = ["index.html"],
|
||||
deps = [":bundle.min_debug.js"],
|
||||
deps = [":bundle.debug.min.js"],
|
||||
)
|
||||
|
||||
benchmark_test(
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user