22888 Commits

Author SHA1 Message Date
mgechev 128038e486 docs: extend the LTS for ngUpgrade with a year (#45078)
PR Close #45078
2022-02-14 14:06:59 -08:00
dario-piotrowicz 42c8533f42 docs(animations): clarify information about query with :leave (#45059)
add information to the query api docs clarifying that elements with
a trigger can be queried via `:leave` when their parent is leaving

this exception is potentially something to be changed (see #45058)
but for the time being the docs can be updated to make the users
aware of such behavior

PR Close #45059
2022-02-14 14:05:22 -08:00
Mina Hosseini Moghadam 2cc8fb0a08 docs: change dependencies to devDependencies in document (#45053)
after installing @angular/localize package, it will be placed in devDependencies object
PR Close #45053
2022-02-14 14:03:45 -08:00
Patrick Cameron 4013db6fd2 fix(docs-infra): fix broken link in Glossary (#45068)
Fix broken link in Glossary document

PR Close #45068
2022-02-14 12:51:30 -08:00
Dario Piotrowicz 95ee74a66c docs(animations): improve aio animations guides info around :enter/:leave (#44550)
improve the aio animations guide information around elements entering and
leaving, this includes, querying them, their transitions and also improvements
to the animations guide live examples

PR Close #44550
2022-02-14 09:16:30 -08:00
markostanimirovic a782be62e9 refactor(docs-infra): replace deprecated toPromise usages (#45045)
This commit replaces deprecated `Observable.toPromise` usages
with `lastValueFrom`.

PR Close #45045
2022-02-11 14:34:28 -08:00
markostanimirovic dc4115d7ed refactor(docs-infra): replace deprecated subscribe usages (#45046)
This commit replaces deprecated `Observable.subscribe` usages.

PR Close #45046
2022-02-11 14:33:46 -08:00
Renovate Bot d8a18717da build: update angular (#45040)
Update Angular packages to latest versions.

PR Close #45040
2022-02-10 09:16:14 -08:00
Srdjan Milic dd177e2c18 refactor(http): deprecated symbol used (#44985)
Support for passing an error value to "throwError" method will be removed in v8 of rxjs. More info at https://rxjs.dev/api/index/function/throwError#throwerror

PR Close #44985
2022-02-09 11:46:32 -08:00
dario-piotrowicz 0b8208690c docs: improve try-it-now card focus area (#45002)
the focus/interactable area for the try-it-now card is wider than
necessary, reduce such width to the appropriate size

PR Close #45002
2022-02-09 10:23:08 -08:00
Renovate Bot 7af1f0a265 build: update scorecard action dependencies to 7f9dca2 (#45026)
PR Close #45026
2022-02-09 10:21:47 -08:00
Renovate Bot d0b88a6810 build: update angular (#44981) (#45027)
Updates Angular

PR Close #44981

PR Close #45027
2022-02-09 10:18:09 -08:00
Renovate Bot fd860e3ef7 build: lock file maintenance (#45027)
Lock file maintenance, patch port #44993.

PR Close #45027
2022-02-09 10:18:09 -08:00
Renovate Bot a01ae487d7 build: update dependency google-closure-compiler to v20220202 (#45013)
PR Close #45013
2022-02-08 11:16:08 -08:00
Renovate Bot 3769de2caa build: update scorecard action dependencies to 230611d (#45012)
PR Close #45012
2022-02-08 11:15:36 -08:00
Amer Yousuf 835b326759 docs(forms): improve email validator directive docs (#45014)
PR Close #45014
2022-02-08 09:57:58 -08:00
Andrew Kushnir 92cf9fbebe fix(core): ViewContainerRef.createComponent should consult module injector when custom one is provided (#44966)
Before Ivy, it was only possible to call the `ViewContainerRef.createComponent` function with the ComponentFactory as the first argument. An instance of a `ComponentFactory` resolved via `ComponentFactoryResolver` contained a reference to an `NgModule` where the component is declared. As a result, the component maintained a DI connection with the module injector tree (by retrieving an instance of `NgModuleRef` internally), even when the custom injector was provided (we try to find a token in a custom injector first and consult module injector after that).

With Ivy, we expanded the `ViewContainerRef.createComponent` function API to support direct references to the Component classes without going through the factory resolution step. As a result, there was no connection to the NgModule that declares the component. Thus, if you provide a custom injector, this is the only injector that is taken into account.

This commit updates the logic for the factory-less case to try retrieving an instance of an `NgModuleRef` using the DI tree which `ViewContainerRef` belongs to. The `NgModuleRef` instance is then used to get a hold of a module injector tree. This brings the factory-less and factory-based logic to more consistent state.

Closes #44897.

PR Close #44966
2022-02-08 09:57:21 -08:00
Kristiyan Kostadinov 09f0254bdd perf(compiler): chain element start/end instructions (#44994)
In templates with several levels of nested nodes, it's common for several `elementStart`/`elementEnd` instructions to show up in a row which can be optimized away.

These changes add chaining support for `elementStart`, `elementEnd`, `elementContainerStart` and `elementContainerEnd` to shave off some bytes when possible.

PR Close #44994
2022-02-08 09:56:51 -08:00
Kristiyan Kostadinov 7b9490ad64 refactor(compiler): rework instruction generation logic for improved flexibility (#44994)
Previously the logic for generating chained instructions was somewhat rigid, because we had to collect all of the calls ahead of time and then call one of the chained instruction helpers. This doesn't work for something like `elementStart`, because we have to descend into other elements that could add to the chain.

These changes refactor the code so that we collect the list of instructions in a flat array and we do the chaining only once at the end when we have the entire instruction set for the code block.

The new approach has the advantage of being (almost) entirely configuration-based via the `CHAINABLE_INSTRUCTIONS` array and being more flexible in allowing us to chain instructions that span across elements.

PR Close #44994
2022-02-08 09:56:50 -08:00
Esteban Gehring f0e82c8af4 docs(common): mark lifecycle methods as nodoc (#45017)
PR Close #45017
2022-02-08 09:56:29 -08:00
Dylan Hunn 7a47add255 release: cut the v13.2.2 release (#45018)
PR Close #45018
13.2.2
2022-02-08 09:39:47 -08:00
Alan Cohen 7bc4dbd7ff docs: fix command to clear cache on Windows (#44988)
PR Close #44988
2022-02-07 21:18:03 -08:00
Andrew Kushnir d40ac2056e refactor(core): drop all .ngfactory and .ngsummary imports (#44957)
This commit updates various places in the repo (mostly tests/examples) to drop all `.ngfactory` and `.ngsummary` imports as they are no longer needed in Ivy.

PR Close #44957
2022-02-07 15:31:49 -08:00
Shai Reznik 1368f58b49 docs: add Cost-Effective Angular Testing (#44969)
to resources
PR Close #44969
2022-02-07 13:17:35 -08:00
Kristiyan Kostadinov b75e90f809 fix(forms): incorrectly keeping track of ngModel with ngFor inside a form (#40459)
When an `NgModel` is created within a `form`, it receives an `NgControl` based on its `name`, but
the control doesn't get swapped out if the name changes. This can lead to problems if the `NgModel`
is part of an `ngFor`, because the name can change based on its position in the list and a new
control can be defined with the same name, leading us to having multiple directives pointing to
the same control. For example, if we start off with a list like :

```
[0, 1, 2]; -> [NgModel(0), NgModel(1), NgModel(2)]
```

Then we remove the second item:

```
[0, 2]; -> [NgModel(0), NgModel(2)]
```

And finally, if we decide to add an item to the end of the list, we'll already have a control for
index 2, causing the list to look like:

```
[0, 2, 3]; -> [NgModel(0), NgModel(2), NgModel(2)]
```

These changes fix the issue by removing the old control when the `name` of the directive changes.

Fixes #38465.
Fixes #37920.

PR Close #40459
2022-02-07 13:16:10 -08:00
iRealNirmal 3919ee37cf refactor(forms): update PatternValidator to inherit AbstractValidatorDirective (#44887)
This commit updates the `PatternValidator` class to inherit `AbstractValidatorDirective` to make it conistent with other validators.

Closes angular#42267

PR Close #44887
2022-02-07 12:07:35 -08:00
JoostK 37af6abb49 fix(compiler): allow banana-in-a-box bindings to end with non-null assertion (#37809)
For two-way-bindings that use the banana-in-a-box syntax, the compiler
synthesizes an event assignment expression from the primary expression.
It is valid for the primary expression to be terminated by the non-null
operator, however naive string substitution is used for the synthesized
expression, such that the `!` would immediately precede the `=` token,
resulting in the valid `!=` operator token. The expression would still
parse correctly but it doesn't implement the proper semantics, resulting
in incorrect runtime behavior.

Changing the expression substitution to force a space between the
primary expression and the assignment avoids this mistake, but it
uncovers a new issue. The grammar does not allow for the LHS of an
assignment to be the non-null operator, so the synthesized expression
would fail to parse. To alleviate this, the synthesized expression is
parsed with a special parser flag to allow for this syntax.

Fixes #36551

PR Close #37809
2022-02-07 10:46:53 -08:00
Alan Agius 604a67f0a1 ci: group all scorecard action dependencies (#44998)
With this change we group all the scorecard action dependencies so that Renovate opens a single PR.

PR Close #44998
2022-02-07 09:46:29 -08:00
dario-piotrowicz baf0c7a11a docs(docs-infra): fix cosidered typo (#44987)
fix the "cosidered" typo (which should be "considered")

PR Close #44987
2022-02-07 09:45:22 -08:00
Renovate Bot cd97d8793f build: update all non-major dependencies (#44974)
Patch port of #44963

PR Close #44974
2022-02-04 11:55:23 -08:00
Ramzan 3fae6637e7 perf(http): remove IE special status handling (#44354)
revert the condition as dev only

PR Close #44354
2022-02-04 11:45:16 -08:00
Andrew Kushnir 30d1c34384 refactor(core): cleanup DebugNode and DebugElement implementations (#44270)
This commit updates `DebugNode` and `DebugElement` implementaitons to cleanup ViewEngine removal artifacts. There is no need for a separate interface and implementation class, so we can combine them now. This comment also gets rid of `R3` suffixes (denoting Ivy) in helper methods.

PR Close #44270
2022-02-04 10:43:43 -08:00
Jayson Acosta 1384013a00 docs: correct typo (#44793)
Service worker card contains typo 'us' when it should be 'use.'
PR Close #44793
2022-02-04 10:42:26 -08:00
zuckjet 9327e97500 refactor(dev-infra): convert nullish coalescing operator to plain javascript (#44968)
low version nodejs doesn't support nullish coalescing operator very well

PR Close #44968
2022-02-04 10:40:44 -08:00
Joey Perrott 59a6ec4396 build: exclude devtools scope from generated changelogs (#44964)
The devtools scoped commits are not included in the repository's CHANGELOG.md
file as these commits are not references areas which are included in the
primary released artifacts.

PR Close #44964
2022-02-03 15:19:26 -08:00
Olivier Capuozzo 1b216297f4 docs: update input-output-diagram.svg (#39900)
"deleteRequest" is the *event* (not target) and "crossOffItem" is the *handler* of the event (not "source").

PR Close #39900
2022-02-03 14:51:00 -08:00
Joey Perrott a89805c3ae build: setup OpenSSF Scorecard (#44960)
Set up OpenSSF Scorecard to begin tracking security metrics within the repo.

PR Close #44960
2022-02-03 14:50:23 -08:00
jhonyeduardo f092badb9c docs: add po-ui to UI Components resources (#43689)
PR Close #43689
2022-02-03 12:45:40 -08:00
dario-piotrowicz d27015a43c refactor(docs-infra): add types to all the aio examples buttons (#44557)
add types to all the buttons in the angular.io examples to encourage
the best practice of always including a type per button (regardless
to whether it is in a form or now)

PR Close #44557
2022-02-03 12:44:48 -08:00
dario-piotrowicz b9aee9070c refactor(docs-infra): remove outdated comments regarding CustomEvent (#44557)
remove the comments present in aio examples saying that for older
browsers such as IE CustomEvent could be necessary (as the the Event
constructor could be not available)

such comments are no longer necessary/relevant since the Event constructor
is available for all the supported browsers

PR Close #44557
2022-02-03 12:44:48 -08:00
Dario Piotrowicz 5fdd8ae3ba refactor(docs-infra): fix template eslint issues in aio examples (#44557)
the aio examples have various eslint issues regarding template rules, those
are currently turned off and TODO comments have been added to them in the
examples eslintrc, fix such issues and remove the respective TODO comments

this also includes examples refactoring to use buttons for better accessibility,
this change tries to make the smallest amound of changes to the examples' behaviors
and designs/UI

PR Close #44557
2022-02-03 12:44:48 -08:00
TANMAY SRIVASTAVA b2f474c4c9 docs: describe your change... (#42899)
in the last Lines ViewEncapsulationComponent should be EmulatedEncapsulationComponent as there is no such  ViewEncapsulationComponent  exists in this example where as 
ShadowDomEncapsulationComponent  contains NoEncapsulationComponent and EmulatedEncapsulationComponent
PR Close #42899
2022-02-03 12:41:36 -08:00
dario-piotrowicz 38b042b6d0 docs: improve punctuation in animation sequence summary (#44567)
slightly improve the punctuation in the animation sequence summary present
in the complex animation sequences guide

PR Close #44567
2022-02-03 12:40:53 -08:00
Dario Piotrowicz 48262bcb70 docs(animations): add section about animating reordering list items (#44567)
add a section regarding reordering list items in the complex animation
sequences guide to help developers rememeber to use a `TrackByFunction`
whenever they are animating `*ngFor` list items which change their
ordering

as suggested here: https://github.com/angular/angular/issues/42750#issuecomment-979127165

relates to issue #28040 and #42750

PR Close #44567
2022-02-03 12:40:53 -08:00
Andrew Scott fb3c0b2605 docs: remove item from changelog that does not work (#44961)
After trying this feature, it turns out the approach does not work and we
will be reverting the commits. Note that the feature _never_ worked so it's
not a breaking change.

PR Close #44961
2022-02-03 12:40:01 -08:00
Daniel Díaz fecd4f8eab docs: remove duplicate closing tags in View Encapsulation file (#44958)
PR Close #44958
2022-02-03 08:54:00 -08:00
Doug Parker 9cce12cbf5 refactor(compiler): add @suppress {msgDescriptions} if no description is present on an i18n message (#44787)
Refs http://b/214103351.

This happens if a user writes `<span i18n>Message</span>`. This is accepted as an internationalized message, but without a description. JSCompiler will throw an error in this situation because descriptions are generally required. Now, the Angular compiler will generate a suppression annotation so JSCompiler allows the syntax. This will ease an internal migration to JSCompiler-based i18n.

PR Close #44787
2022-02-02 15:33:45 -08:00
Andrew Scott b9aab0c87b fix(upgrade): Do not trigger duplicate navigation events from Angular Router (#43441)
This code mimics behavior that Google Analytics has been using to
prevent duplicate navigations. They set up their own `HybridRoutingService`
location sync to avoid duplicate navigations that came from the Angular
router. This would happen because the Angular router would trigger a
navigation, which would then get picked up by the `$locationShim`, which
would trigger a `$locationChangeStart`, which would then be picked up by
the `setUpLocationSync` watcher here, which would again trigger a
navigation in the Angular Router.

All of this can be prevented by checking if the `navigationId` exists on
the history state object. This property is added by the Angular router
during navigations.

fixes #21610

PR Close #43441
2022-02-02 19:51:20 +00:00
Andrew Scott 123f42c744 test(upgrade): update router upgrade tests to use fewer mocks (#43441)
This updates the router upgrade tests to use less mocked behavior. The
test upgrade location module is copied from the one that's used in the
common package. This update to the tests verifies more real behavior of
the upgrade module.

PR Close #43441
2022-02-02 19:51:20 +00:00
mgechev 64adfc9150 docs: remove banner after survey expiration (#44949)
The survey is now over. We can remove the banner.

PR Close #44949
2022-02-02 19:50:20 +00:00