Compare commits

...

154 Commits

Author SHA1 Message Date
Dylan Hunn 7cb3b78acc release: cut the v13.1.3 release (#44757)
PR Close #44757
2022-01-19 09:31:48 -08:00
Ramesh Thiruchelvam 3797d1022d refactor(core): make the error messages tree shakable (#44359)
Long error messages can be tree-shaken in the production build and replaced with error codes.

See: https://github.com/angular/angular/pull/44219#issuecomment-983216374

PR Close #44359
2022-01-18 17:38:10 -08:00
dario-piotrowicz 929788d9a8 refactor(animations): change errors type from any to string (#44726)
errors in the animations code are of type `any` but are consistently
used as if there were `string`s, change `any` to `string` to make
typing more accurate

PR Close #44726
2022-01-18 15:52:05 -08:00
JoostK e9bd16adbe refactor(compiler): remove directive matching from template compiler (#44731)
The directive matching pass that happens during template compilation is
redundant, since directive matching has already happened during the resolution
phase of ngtsc and only matching declarables are provided to the template
compiler. In JIT mode the declarables only become available after the primary
template compilation has completed, so there is no need to perform directive
matching in both JIT and AOT mode.

PR Close #44731
2022-01-18 14:51:09 -08:00
JoostK 95248a0bab refactor(compiler): store modifiers in a bitmask instead of an array (#44731)
This commit slightly reduces memory usage of output AST by storing type
and statement modifiers as a bitmask instead of using an array.

PR Close #44731
2022-01-18 14:51:09 -08:00
JoostK 626f3f230b perf(compiler-cli): reduce analysis work during incremental rebuilds (#44731)
This commit reduces the analysis work that needs to happen during an
incremental rebuild by properly recording files for which no traits were found
in the set of files that have no traits, such that the same file doesn't have
to be reanalyzed during subsequent rebuilds. It also excludes shim files from
analysis.

PR Close #44731
2022-01-18 14:51:08 -08:00
Ramesh Thiruchelvam cab81ba13a refactor(common): make the error messages tree shakable (#44663)
Make Long error messages tree-shakable in the production build with error codes.

fixes #40096

PR Close #44663
2022-01-18 10:31:44 -08:00
AnkitSharma-007 617610e3b0 docs: add Ankit to GDE resources (#44659)
PR Close #44659
2022-01-18 09:25:08 -08:00
Renovate Bot 14eb6c4fab build: update angular (#44728)
PR Close #44728
2022-01-18 09:24:43 -08:00
JoostK f9ca4d8499 fix(ngcc): support element accesses for export declarations (#44669)
Bundlers like Rollup may use an element access expression for an export
declaration, which causes ngcc to ignore those export declarations possibly
resulting in incomplete processing of packages.

Element access syntax may be used when the declared name is not considered
as valid JS identifier, but bundlers may be conservative in determining whether
an identifier can be used (to emit a property access) and opt for a string
literal in an element access instead.

The element access syntax introduces a problem for ngcc, where it wouldn't
consider such export as class declaration, causing them to be skipped. The
ngtsc compiler is implemented with the assumption that all class declarations
use a `ts.Identifier` as name, whereas the element access is using a string
literal for the declared name. This makes it troublesome for ngcc to support
this syntax form in UMD bundles.

To work around the problem, this function transforms these access expressions
into regular property accesses. The source text is parsed to an AST to allow
finding the element accesses in a robust way, after which the affected text
ranges are replaced with property accesses in the original source text.

Closes #44037

PR Close #44669
2022-01-14 17:44:00 -08:00
dario-piotrowicz af0a152a2c fix(animations): apply setStyles to only rootTimelines (#44515)
during keyframe building only consider the root element's timelines
for the style setting, so that the states styles (applied with '*')
can be applied correctly

resolves #32133
resolves #28654

PR Close #44515
2022-01-13 12:01:51 -08:00
Renovate Bot e0bea36acf build: update all non-major dependencies (#44705)
PR Close #44705
2022-01-13 12:01:08 -08:00
Alan Agius 44ff4fbceb test: update integration payload size checks golden file (#44440)
This updates the size checks for Angular CLI version 13.1.3. The increase in size is due to changes in ESBuild.

Before
```js
class bS extends Wl {
  constructor(t, n, r, i) {
    super(t), (this.component = r);
    const o = Is(i + "-" + r.id, r.styles, []);
    n.addStyles(o),
      (this.contentAttr = "_ngcontent-%COMP%".replace(Gl, i + "-" + r.id)),
      (this.hostAttr = "_nghost-%COMP%".replace(Gl, i + "-" + r.id));
  }
  applyToHost(t) {
    super.setAttribute(t, this.hostAttr, "");
  }
  createElement(t, n) {
    const r = super.createElement(t, n);
    return super.setAttribute(r, this.contentAttr, ""), r;
  }
}
```

Now
```js
class ES extends Wl {
  constructor(t, n, r, i) {
    super(t), (this.component = r);
    const o = Is(i + "-" + r.id, r.styles, []);
    n.addStyles(o),
      (this.contentAttr = (function _S(e) {
        return "_ngcontent-%COMP%".replace(Gl, e);
      })(i + "-" + r.id)),
      (this.hostAttr = (function CS(e) {
        return "_nghost-%COMP%".replace(Gl, e);
      })(i + "-" + r.id));
  }
  applyToHost(t) {
    super.setAttribute(t, this.hostAttr, "");
  }
  createElement(t, n) {
    const r = super.createElement(t, n);
    return super.setAttribute(r, this.contentAttr, ""), r;
  }
}
```

PR Close #44440
2022-01-13 18:30:53 +00:00
Renovate Bot 7c49b4148e build: update angular (#44440)
PR Close #44440
2022-01-13 18:30:53 +00:00
Łukasz Holeczek 8234564bff docs: add CoreUI UI Components Library to the resources list (#44613)
PR Close #44613
2022-01-13 18:27:51 +00:00
Joey Perrott 5e4038eb63 build: update shelljs dependencies to "^0.8.5" (#44697)
Update shelljs dependencies to ^0.8.5 to fix a vulnerability reported to shelljs.

PR Close #44697
2022-01-13 18:27:33 +00:00
Daniel Díaz ba5fe3f531 docs: remove unnecessary parenthesis in View Encapsulation file (#44702)
PR Close #44702
2022-01-13 18:27:13 +00:00
dario-piotrowicz 71449b1dae refactor(elements): remove the createCustomEvent function (#44703)
the createCustomEvent function's pupose is to create customEvents
even on browsers where `CustomEvent` is not a constructor,
`CustomEvent` is currently available in all supported browsers (since
IE11 support has ended), so remove the function as it is no longer
needed

PR Close #44703
2022-01-13 18:26:54 +00:00
Jessica Janiuk ec95631ceb refactor(animations): Remove unnecessary IE specific code (#44686)
There were a few places we were still checking for Internet Explorer. This removes the references throughout the animations package.

PR Close #44686
2022-01-12 20:43:23 +00:00
Andrew Kushnir 74037f165c ci: add golden files for runtime error codes (#44677)
Runtime error codes in the Core, Common and Forms packages were not included into the `public-api` group reviews. This commit creates the necessary golden files to keep track of further changes in the runtime codes.

This is a followup from https://github.com/angular/angular/pull/44398#issuecomment-1006910976.

PR Close #44677
2022-01-12 20:42:06 +00:00
iRealNirmal 07d97af1e8 refactor(forms): update email validator to inherit abstractValidator (#44545)
Modified email validator to inherit abstractValidator.

For every validato type different PR will be raised as discussed in #42378.

Closes #42267

PR Close #44545
2022-01-12 20:41:40 +00:00
Dmytro Mezhenskyi d613571154 docs: add Decoded Frontend YT channel to resources list (#44278)
PR Close #44278
2022-01-12 20:41:17 +00:00
Andrew Scott d1762c78af release: cut the v13.1.2 release (#44698) 2022-01-12 10:47:32 -08:00
wszgrcy 92784cafab docs: add miniprogram cross-platform development resource with resources.json (#44646)
PR Close #44646
2022-01-11 22:04:22 +00:00
Alex Rickabaugh 60fb27f12d fix(compiler-cli): properly index <svg> elements (#44678)
In the `Element` node of a parsed `<svg>` element, the `name` is recorded
as `:svg:svg`. When the Angular Indexer ran over this element, it would
attempt to find this name in the template text and fail, as the namespace
portion of the name was added automatically at parse time and is of course
missing from the original template.

This commit changes the indexer to detect these namespaced elements and only
search for the tag name.

PR Close #44678
2022-01-11 19:16:19 +00:00
Alex Rickabaugh 59eef29a6c fix(compiler): correct spans when parsing bindings with comments (#44678)
When parsing a binding with a comment at the end of the expression, the
parser previously had logic to offset the parsed spans by the length of the
comment. This logic seemed not to serve any useful purpose, and instead
resulted in the corruption of the spans. For example, in the expression
`{{foo // comment}}`, the parser would map the parsed `foo` `PropertyRead`
node at the location of the characters 'ent' from the comment suffix.

This commit removes that logic, correcting the parsed spans of such nodes in
the presence of comments. Removing this logic does not seem to have caused
any tests to fail.

PR Close #44678
2022-01-11 19:16:19 +00:00
Alex Rickabaugh 1e918b6f31 fix(compiler-cli): handle property reads of ThisReceiver in the indexer (#44678)
Previously, the Angular Indexer made an assumption that in any binding to
a property of an `ImplicitReceiver`, the property name begins at the start
of the binding. This is true for normal reads from `ImplicitReceiver` as
the implicit receiver has no representation in the template.

However, `ThisReceiver` inherits from `ImplicitReceiver` and _does_ have a
template representation. Such a binding looks like `{{this.foo}}`. This
commit corrects the logic of the indexer to use the `nameSpan` of the
property binding instead of its `sourceSpan` to locate the identifier.

PR Close #44678
2022-01-11 19:16:19 +00:00
Doug Parker 69b00a097a refactor(compiler-cli): add validation to extended template diagnostics configuration (#44391)
Refs #42966.

This validates the `tsconfig.json` options for extended template diagnostics. It verifies:
* `strictTemplates` must be enabled if `extendedDiagnostics` have any explicit configuration.
* `extendedDiagnostics.defaultCategory` must be a valid `DiagnosticCategoryLabel`.
* `extendedDiagnostics.checks` keys must all be real diagnostics.
* `extendedDiagnostics.checks` values must all be valid `DiagnosticCategoryLabel`s.

These include new error codes, each of which prints out the exact property that was the issue and what the available options are to fix them.

It does disallow the config:

```json
{
  "angularCompilerOptions": {
    "strictTemplates": false,
    "extendedDiagnostics": {
      "defaultCategory": "suppress"
    }
  }
}
```

Such a configuration is technically valid and could be executed, but will be rejected by this verification logic. There isn't much reason to ever do this, since users could just drop `extendedDiagnostics` altogether and get the intended effect. This is unlikely to be a significant issue for users, so it is considered invalid for now to keep the implementation simple.

PR Close #44391
2022-01-11 17:33:17 +00:00
Doug Parker fb7900b9eb refactor(compiler-cli): add defaultCategory option (#44391)
Refs #42966.

The `defaultCategory` option is used for any extended template diagnostics which do not have any specific category specified for them. It defaults to `warning`, since that is the most common behavior expected for users. This provides an easy way for users to promote all diagnostics to errors or suppress all diagnostics.

PR Close #44391
2022-01-11 17:33:17 +00:00
Doug Parker 7b38c85aeb refactor(compiler-cli): use configured diagnostic category when emitting warnings from extended template diagnostics (#44391)
Refs #42966.

This updates `TemplateContext` to include a new `makeTemplateDiagnostic()` function which automatically uses the correct diagnostic category for that check. This makes sure that each diagnostic is emitted with the correct category. It also implicitly passes some known values like `component` and `code` to make the extended template diagnostics a little simpler. Diagnostics which are suppressed are never instantiated at all, which acts as a slight performance optimization since any emitted diagnostics would be ignored anyways.

Unfortunately, diagnostics still have access to `ctx.templateTypeChecker.makeTemplateDiagnostic()` to manually create diagnostics with a different category. Both banana in box and nullish coalescing checks include tests to make sure they respect a manually configured category. This convention should hopefully give a reasonable certainty that new diagnostics will use the correct reporting function, even if that is not strictly enforced.

PR Close #44391
2022-01-11 17:33:16 +00:00
Doug Parker 7dfa44e71a refactor(compiler-cli): add initial compiler options definitions for extended template diagnostics (#44391)
Refs #42966.

This includes a mapping of extended template diagnostics to their associated diagnostic category. It is generated from the list of diagnostic names, so the list should always be implicitly kept up to date. Usage looks like:

```json
{
  "angularCompilerOptions": {
    "extendedDiagnostics": {
      "checks": {
        "invalidBananaInBox": "error",
        "nullishCoalescingNotNullable": "suppress"
      }
    }
  }
}
```

PR Close #44391
2022-01-11 17:33:16 +00:00
Doug Parker f8e7f60edf refactor(compiler-cli): add allDiagnosticFactories (#44391)
Refs #42966.

This is a static array of all the 1P extended template diagnostic factories built into the Angular compiler directly. It provides an encapsulated list of all diagnostics rather than requiring users to manually list each one individually.

PR Close #44391
2022-01-11 17:33:16 +00:00
Doug Parker a3082fbba7 refactor(compiler-cli): call factories directly from extended template checker (#44391)
Refs #42966.

This moves extended template check factory invocations into the checker itself, where it can provide a more consistent API contract. Factories are called with compiler options and may return a `TemplateCheck` or `undefined` if the current options do not support that check. This allows `nullishCoalescingNotNullable` to disable itself when `strictNullChecks` is disabled without throwing errors. This gives extended template diagnostics a stronger abstraction model to define their behavior with.

PR Close #44391
2022-01-11 17:33:16 +00:00
Doug Parker fe02841b63 refactor(compiler-cli): add ExtendedTemplateDiagnosticName and TemplateCheckFactory (#44391)
Refs #42966.

The enum of extended template diagnostic names allows a global registry of first-party diagnostics with a developer-friendly string name which can be used for configuration. This name is used in the new `TemplateCheckFactory` to bind the name to a particular `ErrorCode` and make both available *before* constructing the actual template check, which is necessary to configure it appropriately.

PR Close #44391
2022-01-11 17:33:16 +00:00
JoostK 08049fa23f fix(compiler-cli): enable narrowing of using type guard methods (#44447)
The changes in 2028c3933f caused method
calls to be emitted using additional parenthesis into the TCB, which in
turn prevented proper type narrowing when the method acts as a type
guard. This commit special-cases method calls from property reads to
avoid the additional parenthesis.

Fixes #44353

PR Close #44447
2022-01-10 21:20:06 +00:00
Patrick Prakash c375e5d22f docs: Updated described version number (#44365)
Updated a mentioned version to a recent angular version number to cope up with the latest version
PR Close #44365
2022-01-10 19:58:52 +00:00
Renovate Bot c0a33412b4 build: update all non-major dependencies (#44502)
PR Close #44502
2022-01-10 19:55:24 +00:00
twerske 3512eb6cd3 docs: improve the component styling guide (#44234)
PR Close #44234
2022-01-10 19:53:56 +00:00
Kyoz 7f2f992360 docs: missing whitespace in HostListener example (#44624)
PR Close #44624
2022-01-10 19:53:09 +00:00
Dario Piotrowicz abc217b28e fix(animations): retain triggers values for moved tracked list items (#44578)
when reordering a list with animations the list items lose their current
triggers values, that is because the reordering of an item is implemented
as follows (_note:_ the following implementation has been added in PR #23534)
 - the item is removed and marked _setForRemoval_
 - the item is re-inserted, and the _setForRemoval_ is changed to _setForMove_
 - the player set for animating the removal is destroyed when _setForMove_ is detected

the above steps allow the element not to be animated and to keep its styling but the
triggers values get lost since the removal transition/player has already been initialized,
so this change adds a _previousTriggersValues_ map in the _REMOVAL_FLAG_ field in order to
restore the triggers values if/when the removal turns out to be a move, changing the above steps to:
 - the item is removed and marked setForRemoval __and its current triggers values are saved as well__
 - the item is re-inserted, and the setForRemoval is changed to setForMove
 - the player set for animating the removal is destroyed when setForMove is detected __and the
   trigger values are re-applied in the engine's statesByElement map__

resolves #29526

PR Close #44578
2022-01-07 22:15:52 +00:00
Renovate Bot 919f8ae4e8 build: update dependency google-closure-compiler to v20220104 (#44655)
PR Close #44655
2022-01-07 19:16:52 +00:00
Kristiyan Kostadinov 63c8e56a3a fix(compiler-cli): incorrectly interpreting $any calls with a property read (#44657)
This was flagged during the code review of #44580. When generating a type check block, we were interpreting any call to `$any` as an `as any` cast, even if it's part of a `PropertyRead` (e.g. `foo.$any(1)`). This is handled correctly in other parts of the compiler, but it looks like it was missed in the type checker.

PR Close #44657
2022-01-07 18:11:58 +00:00
Dario Piotrowicz 4de2b6d836 refactor(docs-infra): remove IE11 code (#44570)
since IE11 is no longer a supported browser, remove angular.io code
implemented specifically for IE11 support

this change reverts the following PRs:
 - #26059 (slightly)
 - #28188 (fully)
 - #32871 (fully)
 - #41183 (partially)

PR Close #44570
2022-01-07 18:11:36 +00:00
dario-piotrowicz 964a696fc2 refactor: fix various typos across different packages (#44523)
simply fix different unrelated typos present in various packages

PR Close #44523
2022-01-07 18:11:11 +00:00
alkavats1 1c8aecbf48 docs(common): use <em> instead of <i> in examples (#44648)
Updated the html tag format from <i> to <em> in ts file. <em> tag helps to improve the code quality

PR Close #44648
2022-01-07 18:10:47 +00:00
Doug Parker 1028a4eb6c refactor(compiler-cli): update template typechecking link to latest angular.io version (#44649)
This page exists in the most recent angular.io version (v13 currently), so there's no need to link to an old version. The hash also refers to the title section of the page, which isn't necessary and is now dropped.

PR Close #44649
2022-01-07 18:10:19 +00:00
Andrew Kushnir d252cffc61 refactor(forms): use shared RuntimeError class (#44398) (#44652)
This commit performs some refactoring of the AbstractControl-based classes to employ shared `RuntimeError` class and also updates the code to avoid duplication and improve minification.

PR Close #44398

PR Close #44652
2022-01-07 17:45:06 +00:00
Andrew Kushnir 245365957a refactor(core): move runtime error code logic (#44398) (#44652)
This commit moves some logic to make the location of runtime error codes consistent across packages. Now all error codes are located in `packages/core/src/errors.ts` file.

PR Close #44398

PR Close #44652
2022-01-07 17:45:06 +00:00
Andrew Kushnir c4fbd85acf refactor(core): make RuntimeError reusable across packages (#44398) (#44652)
This commit updates the code around the `RuntimeError` class to make it more reusable between packages (currently it's only usable inside the `core` package). Specifically:
- the error formatting logic was updated to handle cases when there is no error message provided
- there is no special Set that contains a set of error codes for which we have guides on angular.io. Instead, this is now encoded into the error code itself (making such codes negative integers). Having a separate Set makes it non-tree-shakable, which we want to avoid.

This change should allow to employ the `RuntimeError` class in other packages to further standardize this subsystem and make the errors thrown by the framework consistent.

As a part of the refactoring, the `common` package code was also updated to follow the same logic as `core`, since the `RuntimeError` class was used there as well.

PR Close #44398

PR Close #44652
2022-01-07 17:45:06 +00:00
Andrew Kushnir 57d5f9529d build: use correct target name (#44651)
Dev mode output was switched from ES5 -> ES2015 recently and as a part of those changes, some target names that contained `_es5` postfixes were changes to `_es2015` instead. This commit fixes the issue with one of the recently merged BUILD files that contained the old (`_es5`) postfix.

PR Close #44651
2022-01-06 16:42:22 -08:00
alkavats1 2913b4c58b docs(common): url link format updated (#44645)
fix the url link format from http to https in BAZEL.md && component-styles.md

PR Close #44645
2022-01-06 23:49:47 +00:00
Joey Perrott 6c15170eb9 build: update .bazelversion (#44641)
Update to the latest version of bazel.

PR Close #44641
2022-01-06 23:49:02 +00:00
JoostK a26afce68c fix(compiler-cli): fix crash during type-checking of library builds (#44587)
When building a library, the `rootDir` option is configured to ensure
that all source files are present within the entry-point that is being
build. This imposes an extra constraint on the reference emit logic,
which does not allow emitting a reference into a source file outside of
this `rootDir`.

During the generation of type-check blocks we used to make a best-effort
estimation of whether a type reference can be emitted into the
type-check file. This check was relaxed in #42492 to support emitting
more syntax forms and type references, but this change did not consider
the `rootDir` constraint that is present in library builds. As such, the
compiler might conclude that a type reference is eligible for emit into
the type-check file, whereas in practice this would cause a failure.

This commit changes the best-effort estimation into a "preflight"
reference emit that is fully accurate as to whether emitting a type
reference is possible.

Fixes #43624

PR Close #44587
2022-01-06 23:44:24 +00:00
JoostK d13e054950 refactor(compiler-cli): implement realpath in NgtscCompilerHost (#44587)
The `NgtscCompilerHost` is implemented using the `FileSystem`
abstraction of the compiler, which is implemented for tests using an
in-memory `MockFileSystem`. If the in-memory filesystem contains
symlinks, then using `NgtscCompilerHost` would not reflect their
resolved real path. Instead, the TypeScript compiler would use its
default implementation based on the real filesystem, which is unaware of
the in-memory `MockFileSystem` setup.

This change does not currently address any issues, but is being fixed
as it prevented a reproduction scenario from behaving correctly.

PR Close #44587
2022-01-06 23:44:24 +00:00
JoostK 9b19ba0b85 test(compiler-cli): properly support symlinks in MockFileSystem (#44587)
This commit fixes an issue with symlink handling in `MockFileSystem`,
where entries within a symlink would fail to resolve.

PR Close #44587
2022-01-06 23:44:24 +00:00
JoostK c9eef5e969 refactor(compiler-cli): use absoluteFromSourceFile to obtain a source file path (#44587)
Using `absoluteFromSourceFile` leverages the cache of the resolved
absolute path, instead of having to compute it each time.

PR Close #44587
2022-01-06 23:44:24 +00:00
JoostK 3b7fe8ba7d refactor(compiler-cli): improve DX for reference emit failures (#44587)
In certain scenarios, the compiler may have crashed with an
`Unable to write a reference` error which would be particularly hard
to diagnose. One of the primary reasons for this failure is when the
`rootDir` option is configured---typically the case for libraries---
and a source file is imported using a relative import from an external
entry-point. This would normally report TS6059 for the invalid relative
import, but the crash prevents this error from being surfaced.

This commit refactors the reference emit logic to result in an explicit
`Failure` state with a reason as to why the failure occurred. This state
is then used to report a `FatalDiagnosticException`, preventing a hard
crash.

Closes #44414

PR Close #44587
2022-01-06 23:44:24 +00:00
Yuchao Wu 5017bf92fe docs(animations): fix grammar (#44607)
Fix grammar issues based on suggestions in issue #44403

Fixes #44403

PR Close #44607
2022-01-06 18:40:03 +00:00
shejialuo c0d3fbeff0 docs(docs-infra): improve the content of attribute directives (#44628)
Improve docs "Understanding Angular-Directives-Attribute Directives"

In `highlight.directive.1.ts`, add the `private` keyword for `el` property
to make it correct and consistent with subsequent examples.

For section "Setting the value with user input", add a step to tell the
reader change the method `onMouseEnter`, thus more readable.

For section "Binding to a second property", delete the aliase for the
`Input` property, and changes the name back to `appHighlight` in the code
to make it consistent with the whole tutorial.

PR Close #44628
2022-01-06 18:36:46 +00:00
Kristiyan Kostadinov 7130bffbbd test: clean up more entryComponents usages (#44561)
Cleans up some more tests that were using `entryComponents`.

PR Close #44561
2022-01-06 18:36:22 +00:00
Yousaf Nawaz 8b2536e5e0 docs: fix typos in using libraries guide (#44634)
correct word typically, typescript and import

PR Close #44634
2022-01-06 00:23:06 +00:00
Dario Piotrowicz 9b9042c8d1 docs(animations): fix links to the AnimationBuilder.build method (#44594)
In angular.io links to the AnimationBuilder.build method are broken and do not
point to the api docs page, fix such broken links

Also apply minor wording and related improvements

PR Close #44594
2022-01-06 00:22:43 +00:00
alkavats1 98592b03bd docs(common): url link format updated (#44638)
fix the url link format from http to https in i18-common-locale-id.md file

PR Close #44638
2022-01-05 23:21:11 +00:00
Kristiyan Kostadinov 7dc6802db9 test(upgrade): fix flaky tests (#44597)
Fixes a couple of tests that have been flaking our test runs. The two tests actually failed consistently when run in isolation, but they passed if at least one test ran before them. My understanding was that they failed, because they were running outside of the `NgZone` which meant that the errors being thrown inside of a `Promise` weren't being flushed.

PR Close #44597
2022-01-05 23:20:43 +00:00
Paul Gschwendtner 6279e0a239 ci: temporarily disable components-repo-unit-tests job (#44505)
Temporarily disables the components repo unit tests job that
breaks due to us changing the devmode output to ES2015 in Angular Bazel.

This is a trivial thing to solve in the COMP repo but the job needs
to be disabled first, so that the changes can be released.

PR Close #44505
2022-01-05 23:20:21 +00:00
Paul Gschwendtner d908761f1f test: update example di tests to work with es2015 (#44505)
* `forwardRef` does not work with ES2015 and TypeScript's decorator
  downlevel emit. This is a known limitation we work around in Angular
  applications by either compiling tests with the Angular compiler, or
  by running a custom decorator downlevel transform (like in the CLI).

PR Close #44505
2022-01-05 23:20:21 +00:00
Paul Gschwendtner b734ceb3dc test: update acceptance core tests to work with es2015 (#44505)
Updates the acceptance core tests to work with ES2015 devmode output.
There were two issues surfacing:

* The NodeJS test execution failed because Domino does not handle
  destructuring syntax properly. This is because `Node.children` is not
  an iterable.

* `forwardRef` does not work with ES2015 and TypeScript's decorator
  downlevel emit. This is a known limitation we work around in Angular
  applications by either compiling tests with the Angular compiler, or
  by running a custom decorator downlevel transform (like in the CLI).

PR Close #44505
2022-01-05 23:20:21 +00:00
Paul Gschwendtner cefe9f0f2e test: update router tests to work with es2015 temporal dead zone (#44505)
Update router tests to work with the the es2015 temporal dead zone.

Somewhat similar to: https://github.com/angular/angular/issues/30106.

PR Close #44505
2022-01-05 23:20:21 +00:00
Paul Gschwendtner 5fa2c88134 test: update ngtsc specs to work with es2015 output (#44505)
Updates the ngtsc specs to work with ES2015 output.

PR Close #44505
2022-01-05 23:20:21 +00:00
Paul Gschwendtner 7b78256d6d build: switch devmode output to es2015 (#44505)
To make our test output i.e. devmode output more aligned
with what we produce in the NPM packages, or to be more
aligned with what Angular applications will usually consume,
the devmode output is switched from ES5 to ES2015.

Additionally various tsconfigs (outside of Bazel) have been
updated to match with the other parts of the build. The rules
are:

ES2015 for test configurations, ES2020 for actual code that will
end up being shipped (this includes the IDE-only tsconfigs).

PR Close #44505
2022-01-05 23:20:21 +00:00
Andrew Kushnir 0daa9bfd26 refactor(forms): make validators code compatible with property renaming (#44500)
This commit refactors the code of the base validators class to make it compatible with the property renaming optimization. Currently the code makes an assumption that the field with a specified name (defined as a string) can be found on an object, but with property renaming optimization this is not correct.

PR Close #44500
2022-01-05 18:43:37 +00:00
Chris Mancini 426b6f9472 docs(router): fix code block for IsActiveMatchOptions (#44635)
PR Close #44635
2022-01-05 17:47:08 +00:00
Dario Piotrowicz 6c5d73e3e4 docs(animations): fix filter-animations docregion (#44544)
the filter animation example in the complex-animation-sequences guide
talks about entering and leaving elements, but the presented html
snipped exluded the *ngFor which actually adds and removes the elements,
so add the *ngFor section to make the example complete and
understandable

PR Close #44544
2022-01-05 17:46:11 +00:00
JoostK 0ac4c0b406 refactor(compiler): remove output AST functions (#44411)
These functions are not used anymore so they are removed.

PR Close #44411
2022-01-04 15:54:12 -08:00
JoostK 07b8e56e11 refactor(compiler): remove class related output AST types (#44411)
The Ivy compiler no longer generates classes so this commit removes
the supporting output nodes.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK 5f78f55f0d refactor(compiler): remove type-casting related output AST types (#44411)
The Ivy compiler no longer generates code for type-checking purposes
using the output AST types. Instead, it uses TypeScript AST nodes and
its printer for type-checking. This commit removes the type-related
output nodes.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK 4688a180f4 refactor(compiler): remove some unused output AST types (#44411)
This kind of output is no longer emitted into generated code, so the
supporting output AST is removed.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK d7faf223e6 refactor(compiler): remove unused method from binding parser (#44411)
This method is no longer called so is being removed.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK 6f70524495 refactor(compiler): make template preparser null-safe (#44411)
This commit removes some non-null assertion operations to improve
null-safety.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK 94f34e028e refactor(compiler): remove unused unsupported function (#44411)
This function is no longer used so is being removed.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK db480829d4 refactor(compiler): make keySpan required in binding parser (#44411)
Now that ViewEngine has been removed the `keySpan` property can be
made required, as it is always provided in the Ivy compiler

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK 9ef9b88cfd refactor(compiler): cleanup distinction in parse logic (#44411)
This removes the special casing of parse-validation logic that was only
used by Ivy.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK bbc368c9e8 refactor(compiler): remove BindingForm enum (#44411)
The Ivy compiler only uses `BindingForm.Expression`, so all other
variants are removed.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK 5fdc660537 refactor(compiler): cleanup AST fixup of listener instructions (#44411)
This commit refactors the generation of listener instructions to no
longer fixup the output AST that was designed for ViewEngine.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK 4f40266b21 refactor(compiler): remove unused assertion function (#44411)
This code is no longer used now that ViewEngine has been removed.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK c359381dc3 refactor(compiler): cleanup unsafe usage of null value for ng-content selector (#44411)
This commit improves the null-safety of the ng-content selector and
updates a comment that turned out to be slightly inaccurate.

Closes #38407

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK 63c5a18b89 refactor(compiler): remove unused code from output logic (#44411)
This code is no longer used now that ViewEngine has been removed.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK 9103b74ec0 refactor(compiler): remove unused AstPath (#44411)
This code is no longer used now that ViewEngine has been removed.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK 75f7864dc7 refactor(compiler): remove unused logic from ConstantPool (#44411)
The `ConstantPool.getDefinition` method is not being used anymore, so
this commit removes anything that is related to this method.

PR Close #44411
2022-01-04 15:54:11 -08:00
JoostK 59cd255dde refactor(compiler): remove unused type declarations (#44411)
This code is no longer used now that ViewEngine has been removed.

PR Close #44411
2022-01-04 15:54:10 -08:00
JoostK 9c76560858 refactor(compiler): remove syntax error logic (#44411)
This code is no longer used now that ViewEngine has been removed.

PR Close #44411
2022-01-04 15:54:10 -08:00
dario-piotrowicz db768911c0 refactor(animations): add unit test for leaving animated child (#44489)
add a new unit test to make sure that leaving elements queried via
a parent queried via animateChild are correctly removed

note: this tests the fix introduced in PR #44357

PR Close #44489
2022-01-04 15:53:36 -08:00
Andrew Kushnir a6d12ef667 test: remove newlines to make a test more stable (#44616)
One of the tests was not taking into account newlines in the text content of an element, thus failing in some browsers. This commit makes the test more stable by removing newlines and comparing the output after that.

PR Close #44616
2022-01-04 15:53:00 -08:00
dario-piotrowicz 25aef6281a fix(docs-infra): adjust code link styling height (#44376)
the height of code links (anchors inside code tags or
code tags inside anchors) is inconsistent, fix such
issue by also making sure that code links to external
resources do not get wrongly styled

PR Close #44376
2022-01-04 12:19:09 -08:00
dario-piotrowicz 55209e5a37 docs(animations): add links to state() references (#44376)
the keyword 'state' is included in the `ignoredWords` set that prevents
certain words to be autolinked, this causes the animations' state
function not to be automatically linked, so manually link those
references to the state api docs

PR Close #44376
2022-01-04 12:19:09 -08:00
Abdurrahman Abu-Hijleh 0be1a82d91 docs: fix code sample indentation (#44517)
PR Close #44517
2022-01-04 12:15:55 -08:00
AlirezaEbrahimkhani d389bb8de6 docs: fix ngOnChange description issue (#44582)
ngOnChange respond when Angular sets or resets data-bound @input properties and description of the ngOnChanges should be `When an [input](#input) binding value changes` instead of `When an [input](#input)/[output](#output) binding value changes`

resolves angular#44559

PR Close #44582
2022-01-04 12:15:19 -08:00
huangqing 77562f9235 docs: Replace OnInit with AfterViewInit (#44485)
`this.adHost` is undefined if loadComponent is called in OnInit.
So replace OnInit with AfterViewInit!
PR Close #44485
2022-01-04 12:14:45 -08:00
Paul Gschwendtner 46c6f2052c test: update size goldens to reflect latest CLI devkit update (#44490)
Updates the size goldens to the reflect the latest CLI devkit updates.

PR Close #44490
2022-01-04 12:14:15 -08:00
Paul Gschwendtner 4765bf1c7a build: update release config to reflect latest ng-dev config changes (#44490)
The ng-dev release config changed its release configuration in order
to support experimental packages. This commit updates the FW release
config to work with the new config signature of ng-dev.

All of our peackages are non-experimental, so we do not specify
an explicit `experimental` property.

PR Close #44490
2022-01-04 12:14:15 -08:00
Paul Gschwendtner ef0d161d3a build: switch all instances from ng_rollup_bundle to app_bundle (#44490)
The `ng_rollup_bundle` rule has been replaced with a new rule called
`app_bundle`. This rule replicates the Angular v13 optimization
pipeline in the CLI, so that we can get better benchmarking results.
Also the rule is much simpler to maintain as it relies on ESbuild.

The old `ng_rollup_bundle` rule did rely on e.g. build-optimizer that no
longer has an effect on v13 Angular packages, so technically size
tests/symbol tests were no longer as correct as they were before. This
commit fixes that.

A couple of different changes and their explanation:

* Language-service will no longer use the benchmark rule for creating
  its NPM bundles! It will use plain `rollup_bundle`. ESBuild would have
  been nice but the language-service relies on AMD that ESBuild cannot
  generate (yet?)

* Service-worker ngsw-worker.js file was generated using the benchmark
  bundle rule. This is wrong. We will use a simple ESbuild rule in the
  future. The output is more predictable that way, and we can have a
  clear use of the benchmark bundle rule..

* A couple of benchmarks in `modules/` had to be updated to use e.g.
  `initTableUtils` calls. This is done because with the new rule, all
  files except for the entry-point are considered side-effect free. The
  utilities for benchmarks relied on side-effects in some
  transitively-loaded file (bad practice anyway IMO). We are now
  initializing the utilities using a proper init function that is
  exported...

PR Close #44490
2022-01-04 12:14:15 -08:00
Paul Gschwendtner b04e9a684b build: update postinstall script to account for local target references in dev-infra (#44490)
We are in an inconvenient situation where the ng-dev package might rely
on packages from the Angular framework repository. Given that we install
this package in the framework repository, we need to update some
references through a postinstall.

This commit updates the patches to account for the latest changes in the
dev-infra package/repository.

PR Close #44490
2022-01-04 12:14:15 -08:00
Paul Gschwendtner 97f27d7ea3 build: add postinstall script as runfile for yarn_install repository rule (#44490)
Adds the postinstall script as runfile for the `yarn_install`
repository rule, so that the dependencies are re-fetched when
the script changes.

PR Close #44490
2022-01-04 12:14:15 -08:00
Paul Gschwendtner 16bc023389 build: update symbol extractor to support IIFE bundles using arrow-functions (#44490)
Updates the symbol extractor to support IIFE bundles using
arrow-functions instead of function declarations. This is in preparation
for running symbol extraction tests with the overhauled optimization
pipeline for Angular v13, relying on ESBuild internally.

Also removes rollup-specific code that does not seem to be relevant
anymore / rollup will be replaced anyway.

PR Close #44490
2022-01-04 12:14:15 -08:00
Paul Gschwendtner 158c9d6803 build: update angular (#44490)
Updates Angular and the dev-infra package to the latest
version/build.

PR Close #44490
2022-01-04 12:14:15 -08:00
Borja Paz Rodríguez acb95f5219 docs: fix several typos (#44508)
PR Close #44508
2022-01-04 12:13:47 -08:00
Dario Piotrowicz a1ca376cab refactor(docs-infra): improve aio-footer's layout (#44532)
improve aio-footer's layout by using grid instead of flexbox,
such change makes it so that we have four columns on wide window
sizes (desktop), two columns on medium window sizes (desktop/tablet)
and a single column on small window sizes (mobile), compared to the
flex implementation which could only have either 4 columns or 1

this makes the footer look generally nicer for various window sizes
(especially in the middle range in which one column was too little
and four were too much)

note: also a scroll of auto has been added so we that we can be sure
that overflowing footer content never creates a global layout issue

PR Close #44532
2022-01-04 12:13:22 -08:00
Yousaf Nawaz 6ca075d2bd docs: add missing npm install instruction (#44574)
add missing npm install instruction to start->deploying an application

Fixes #44542

PR Close #44574
2022-01-04 12:07:38 -08:00
ivanwonder f5addee488 fix(language-service): revert the test files for Ivy (#44528)
The `completions_spec` and `definitions_spec` is removed by accident
in [bb9ff60](https://github.com/angular/angular/commit/bb9ff6003c620b3cf00232189d60097395382802)

PR Close #44528
2022-01-04 12:06:49 -08:00
Yousaf Nawaz 5ca7068173 docs(docs-infra): fix numbering of 'running your application locally' steps (#44575)
fix numbering of 'running your application locally' steps and corrected step 1 statement.

PR Close #44575
2022-01-04 12:06:07 -08:00
Serhey Dolgushev 845038c28f docs: fixed meetup URL (#44585)
PR Close #44585
2022-01-04 12:05:45 -08:00
Adam Plumer f9e18b7ae1 build: bump license year (#44590)
The year has advanced by one cycle. In accordance with this
practice, we increment the value of the bounding set of our
license year by one.

PR Close #44590
2022-01-04 12:05:25 -08:00
George Kalpakas 00cc0d937b docs: update instructions for running ng-dev misc build-and-link command (#44604)
Fixes #44571

PR Close #44604
2022-01-04 12:05:05 -08:00
zuckjet d619783a55 docs(compiler): fix typo in getHtmlTagDefinition() function (#44601)
PR Close #44601
2022-01-04 12:04:04 -08:00
JoostK 70a2051e95 docs: remove Angular 10 from support table (#44611)
PR Close #44611
2022-01-04 12:03:37 -08:00
Yousaf Nawaz 40dc07223a docs: fix invalid link of library support for npm packages guide (#44612)
change link of library support to point to guide->creating-libraries

fixes #44583

PR Close #44612
2022-01-04 12:03:15 -08:00
Chihab Otmani 2469b88af2 docs: fix typo (#44592)
PR Close #44592
2022-01-04 10:59:59 -08:00
Andrew Scott e6beeab7dd ci: remove atscott for unavailable users (#44539)
I am back from vacation so I can now be assigend PRs to review

PR Close #44539
2022-01-04 10:38:42 -08:00
Joey Perrott beb18286aa docs: remove recent departures from contributors page (#44514)
PR Close #44514
2021-12-16 14:29:30 -05:00
Alex Rickabaugh 0115e2b664 release: cut the v13.1.1 release (#44495)
PR Close #44495
2021-12-15 14:32:40 -05:00
Kristiyan Kostadinov c2ed1ae945 fix(docs-infra): update examples to Angular 13.1 (#44487)
Updates AIO and the live examples to 13.1.0 in order to resolve a build error when opened on Stackblitz. They were using TS 4.5 with Angular ~13.0.0 which doesn't support 4.5.

Fixes #44480.

PR Close #44487
2021-12-15 13:22:14 -05:00
Dylan Hunn bce108ab49 fix(forms): _reduceValue arrow function now has correct types. (#44483)
I previously strengthened some weak types in #44370. One of these fixes exposed an incorrect call into `_reduceChildren` from `_reduceValue`. This was caught in google3 by a caller who was extending `FormGroup` and overriding these methods.

Special thanks to Bart G for catching this issue and suggesting a fix.

PR Close #44483
2021-12-15 12:27:06 -05:00
Dylan Hunn 240edcbc4e test(docs-infra): Correct an invalid assumption in aio tests. (#44479)
The aio application expects `FormControl` to have no properties for the purposes of its own internal tests, but this is no longer true after #44434.

PR Close #44479
2021-12-14 16:14:48 -05:00
Kristiyan Kostadinov 11187ef433 refactor(compiler): clean up workarounds for TypeScript 4.5 (#44477)
Cleans up some of the temporary workarounds that were necessary in order to land support for TypeScript 4.5 since they're no longer necessary.

PR Close #44477
2021-12-14 16:14:02 -05:00
George Kalpakas 9165191a13 build(docs-infra): upgrade cli command docs sources to febee7484 (#44476)
Updating [angular#13.1.x](https://github.com/angular/angular/tree/13.1.x) from
[cli-builds#13.1.x](https://github.com/angular/cli-builds/tree/13.1.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/e7881e40b...febee7484):

**Modified**
- help/new.json

PR Close #44476
2021-12-14 16:13:30 -05:00
Spej 17ac7c6624 docs: Fixed typo 'test' => 'text' (#44464)
PR Close #44464
2021-12-14 16:12:58 -05:00
dario-piotrowicz c195bd0b24 refactor(animations): remove the unused enter and leave selectors (#44460)
remove the no longer used ENTER_SELECTOR and LEAVE_SELECTOR constants

note: their uses have been removed in PR #19455

PR Close #44460
2021-12-14 16:12:36 -05:00
dario-piotrowicz 4a1cdbafc6 refactor(animations): improve _finalKeyframe non-null assertion (#44458)
instead of declaring the WebAnimationsPlayer's _finalKeyframe
field with a non-null assertion, declare it as optional field
and use a non-null assertion only when it is being used in the
beforeDestroy function

relates to #24571

PR Close #44458
2021-12-14 16:12:12 -05:00
Dylan Hunn f6f7a375a8 test(forms): Add more tests for FormBuilder method argument shapes. (#44452)
It is possible to pass arguments to `FormBuilder` using four different formats: value-only, boxed value, control config, and value-array. Currently, these different methods are not well-tested, especially as they interact. This PR will add tests for the variety of different argument shapes.

This was originally inspired by typed forms: when `FormBuilder` becomes typed, all these argument shapes should just work, with correct inferred types.

PR Close #44452
2021-12-14 16:11:29 -05:00
Dylan Hunn 199f7a2ba9 refactor(forms): Make the minimum changes to the forms unit tests in order to support the typed forms PR (#43834). (#44451)
Currently, many of our unit tests are written to use heterogenous groups and arrays, and controls that accept heterogenous values. This PR will make the minimum possible alterations to prepare those usages, mainly by annotating them as untyped controls, etc.

This PR is *not* intended to test typed forms, merely to minimize the size of the upcoming PR. This will allow that PR to be focused on the actual features and tests, rather than boilerplate fixes.

PR Close #44451
2021-12-14 16:10:08 -05:00
Dylan Hunn 998c1e63fe fix(forms): I indroduced a minor error in a previous PR: pendingValue is a value not a boolean flag. (#44450)
The bug should have no effect since it's a typings-only, internal-only bug, but it's good to fix nonetheless.

PR Close #44450
2021-12-14 16:09:43 -05:00
JoostK 1a25e381e6 test(ngcc): don't use the workspace typescript version to generate integration test fixtures (#44448)
Now that ViewEngine libraries can no longer be created, the latest
TypeScript version that ngcc should be able to process is TypeScript 4.3,
i.e. the version of TypeScript that was supported in Angular 12.
However, ngcc's integration tests used the TypeScript version of the
workspace to create the JavaScript files from TypeScript sources on
demand. This introduces friction when upgrading the TypeScript version
within the workspace, as changes to TypeScript's emit format may affect
ngcc's ability to process it correctly.

The on demand creation of JavaScript files was convenient for authoring
tests, but it also helped to detect incompatibilities with newer
versions of TypeScript. Now that ngcc no longer has to process newer
versions of TypeScript, we want to pin the integration suite to use
JavaScript code as if it were compiled using TypeScript 4.3, i.e. a
version of TypeScript that is actually supported by ngcc.

This commit updates the integration test to inline all the generated
files directly in the tests, instead of compiling them on demand. This
was done by temporarily installing TypeScript 4.3 and using it to create
the `loadTestFiles` statement from the original TypeScript inputs.

An alternative could have been to install TypeScript 4.3 as an actual
dependency in the workspace and using that to continue compiling the
integration suite on demand, but this brings some overhead in package
installations (TypeScript is ~60MB) and the authoring aspect of ngcc
integration test is expected to diminish, now that ngcc's support is no
longer a moving target.

PR Close #44448
2021-12-14 16:08:28 -05:00
Yousaf Nawaz 48e692dabe docs(docs-infra): change variable names in route guards examples (#44444)
change variable name 'next' to 'route' in route guards examples on developer guides "Routing and Navigation Tutorial: Adding routing to Tour of Heroes" to make it consistent with api docs and subsequent examples.

Fixes #44291

PR Close #44444
2021-12-14 16:08:05 -05:00
faso-dev 5ef03852c8 docs: fix typo (#44427)
`name` instead of `id`
PR Close #44427
2021-12-14 16:07:23 -05:00
jaybell 716f473d29 docs: add jaybell to gde list (#44423)
PR Close #44423
2021-12-14 16:06:32 -05:00
Aristeidis Bampakos 524e5152d7 docs: update Aristeidis Bampakos bio (#44410)
PR Close #44410
2021-12-14 16:06:06 -05:00
dario-piotrowicz bb1d4ff315 fix(animations): don't consume instructions for animateChild (#44357)
TODO: Fill body commit if PR gets accepted

resolves #41483
resolves #30693

PR Close #44357
2021-12-14 16:05:35 -05:00
zuckjet d8b6adb7bc fix(animations): should not invoke disabled child animations (#37724)
Currently child animation will be triggered by `animateChild()` despite it has been disabled.
These changes add some logic to prevent that unexpected behavior.

PR Close #37724

PR Close #37724
2021-12-14 16:05:00 -05:00
Renovate Bot f4fcdffbac build: update all non-major dependencies (#44152)
PR Close #44152
2021-12-14 16:04:34 -05:00
Dylan Hunn a0316ab0c0 refactor(forms): Fix weak helper types in the Forms package, mostly Function types that can be strengthened to specific callbacks. This was originally proposed as part of Typed Forms, but it may be possible to submit at least some of these changes separately and unconditionally (i.e. without relying on TypedOrUntyped.) (#44370)
It is desirable to land this separately to reduce the scope of the Typed Forms PR, by focusing it only on the new type parameters (rather than incidental strictness fixes).

PR Close #44370
2021-12-10 17:13:25 -05:00
Renovate Bot 6c0ac5145b build: update dependency google-closure-compiler to v20211201 (#44392)
PR Close #44392
2021-12-10 16:39:42 -05:00
Renovate Bot a8e5a93e12 build: update angular (#44273)
PR Close #44273
2021-12-10 16:39:05 -05:00
George Kalpakas 266b62c20f build(docs-infra): upgrade cli command docs sources to e7881e40b (#44413)
Updating [angular#13.1.x](https://github.com/angular/angular/tree/13.1.x) from
[cli-builds#13.0.x](https://github.com/angular/cli-builds/tree/13.0.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/481eb4544...e7881e40b):

**Modified**
- help/new.json

PR Close #44413
2021-12-10 16:36:41 -05:00
dario-piotrowicz a0e68250ad docs(animations): improve animation transition api docs (#44396)
improve the transition api docs by removing unnecessary examplanations
and examples

also provide helpful information regarding entering and leaving
elements (as part of #44253)

PR Close #44396
2021-12-10 16:34:01 -05:00
Paul Gschwendtner d7a9b36d91 build: remove unused starlark file that is no longer used (#44430)
Cleans up an unused Starlark file used by the old integration test
setup.

PR Close #44430
2021-12-10 16:31:04 -05:00
Paul Gschwendtner 5bdf321a97 build: fix integration test size trackings not running after recent refactoring (#44430)
Fixes that the integration test size trackings stopped working due to
the recent refactorings (switch to the rule from `@angular/dev-infra-private`).

The size-tracking does not integrate very-well into Bazel and needs
a better solution in the future, allowing for RBE and Windows support,
but currently with the new rule/setup/structure the tracking does not
validate sizes because:

* The `dist/*.js` argument to the tracking script got expanded and
  messed up the indices. It should be passed as a literal. This now
  surfaced because the new rule runs commands in a shell.

* The name for the size goldens were not computed properly because they
  were based on `ctx.attr.name`, but given the new structure, the test
  targets are always named `test`.

PR Close #44430
2021-12-10 16:31:04 -05:00
Alex Rickabaugh b11d3c3759 release: cut the v13.1.0 release (#44418)
PR Close #44418
2021-12-09 12:02:43 -05:00
Alex Rickabaugh 0c35e67ee7 Revert "release: cut the v13.1.0 release (#44417)"
This reverts commit 0e2c357358.

One more try, this time with a manual workaround.
2021-12-09 11:56:46 -05:00
Alex Rickabaugh 0e2c357358 release: cut the v13.1.0 release (#44417)
PR Close #44417
2021-12-09 11:52:25 -05:00
Alex Rickabaugh 22d8e5668e Revert "release: cut the v13.1.0 release (#44416)"
This reverts commit 6fb733fb40.

Still seeing transient errors - trying one more time before moving to a
workaround.
2021-12-09 11:50:04 -05:00
Alex Rickabaugh 6fb733fb40 release: cut the v13.1.0 release (#44416)
PR Close #44416
2021-12-09 11:37:17 -05:00
Alex Rickabaugh 6992a68935 Revert "release: cut the v13.1.0 release (#44415)"
This reverts commit 7e39556013.

The release process failed with a transient error, so reverting this commit
and trying again.
2021-12-09 11:35:00 -05:00
Alex Rickabaugh 7e39556013 release: cut the v13.1.0 release (#44415)
PR Close #44415
2021-12-09 11:31:04 -05:00
Alex Rickabaugh 08694e34dd release: cut the v13.1.0-rc.0 release 2021-12-08 14:24:20 -05:00
512 changed files with 10802 additions and 8593 deletions
+1 -1
View File
@@ -1 +1 @@
4.0.0
4.2.2
+4 -3
View File
@@ -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
+1 -1
View File
@@ -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 }}
+1 -1
View File
@@ -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 }}
+1 -1
View File
@@ -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
View File
@@ -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
-1
View File
@@ -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
View File
@@ -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 -1
View File
@@ -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
+1 -1
View File
@@ -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
+5 -2
View File
@@ -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));
+1 -1
View File
@@ -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)
+6 -6
View File
@@ -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).
+5 -1
View File
@@ -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>
+19 -17
View File
@@ -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({
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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"
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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>
+1 -2
View File
@@ -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
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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() {
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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.
+4 -4
View File
@@ -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
+1 -1
View File
@@ -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

+1 -1
View File
@@ -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
+23 -39
View File
@@ -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",
+16
View File
@@ -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",
+8 -3
View File
@@ -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
View File
@@ -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",
+1 -1
View File
@@ -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');
+1 -1
View File
@@ -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>.
+1 -1
View File
@@ -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)
+5 -30
View File
@@ -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;
+22 -17
View File
@@ -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;
}
}
}
+3 -5
View File
@@ -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) {
-16
View File
@@ -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});
}
+1 -1
View File
@@ -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",
+18 -18
View File
@@ -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",
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
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -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
View File
@@ -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
+17
View File
@@ -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)
```
+79
View File
@@ -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)
```
+19
View File
@@ -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)
```
+6 -4
View File
@@ -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)
+10 -10
View File
@@ -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
}
}
}
+11 -11
View File
@@ -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
}
}
},
-198
View File
@@ -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",
)
+1 -1
View File
@@ -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",
)
+1 -1
View File
@@ -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",
)
+1 -1
View File
@@ -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 -2
View File
@@ -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,
)
+5 -6
View File
@@ -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",
-6
View File
@@ -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