These dates are week-specific to give some flexibility during the release process which frequently happens. I back-dated the most recent minors mainly to make sure we include them when we eventually update to v16 and beyond.
PR Close#47513
This commits update `isDevMode` to rely on the `ngDevMode` which in the CLI is set by the bundler.
We also update `@angular/platform-dynamic-browser` and `@angular/compiler` to remove usage of `jitDevMode`, with this change we remove all internal usages of `isDevMode`.
PR Close#47475
Exposes the host directives to the host and its descendants through DI. This can be useful, because it allows the host to further configure the host directives.
PR Close#47476
When reporting type-checking diagnostics in external templates we create a
`ts.SourceFile` of the template text, as this is needed to report Angular
template diagnostics using TypeScript's diagnostics infrastructure. Each
reported diagnostic would create its own `ts.SourceFile`, resulting in
repeatedly parsing of the template text and potentially high memory usage
if the template is large and there are many diagnostics reported. This commit
caches the parsed template in the template mapping, such that all reported
diagnostics get to reuse the same `ts.SourceFile`.
Closes#47470
PR Close#47471
`TNode`s have the `directiveStart` and `directiveEnd` properties that indicate the indexes at which directive instances (including components) have been stored. Currently there are several places throughout the codebase which assume that if a component matches a node, its index will always be `directiveStart`.
As far as I can tell, we probably ended up accumulating these assumptions, because we needed a quick way of accessing the component instance and it happened to be conventiently stored at `directiveStart`. The reason why it's always stored at `directiveStart` is likely to match the lifecycle hook execution order from ViewEngine.
With host directives these assumptions won't be valid anymore, because we want the host directives to _always_ execute before the host component that they're on so that the host has a chance to override them. To achieve this we have to insert host directives before the component.
These changes address the issue by introducing a new `TNode.componentOffset` property which indicates the offset after `TNode.directiveStart` at which the component is stored. Furthermore, I've removed the `isComponentHost` flag since it was duplicating the information from `TNode.componentOffset` and I've audited and fixed all the places where we read `directiveStart` to account for the changed data structure.
Reasons for some of the decisions I made along the way:
* In the case of host directives, I decided to go against our current convention of executing the component lifecycle hooks before the directive, because lifeycle hooks are a chance to change the component state (e.g. in `ngOnChanges`) and running the component hooks first would allow the host directives to undo any overrides made by the host.
* I decided to go with a `componentOffset`, instead of a `componentIndex` indicating the exact index the component is at, because as the runtime is set up at the moment, it would be difficult to know what index the component is going to end up at. Another problem is that we appear to have some logic that moves the entire "directive window" by incrementing both `directiveStart` and `directiveEnd`. By using an offset, we don't have to worry about the index remaining correct.
PR Close#47490
related to https://github.com/angular/angular/pull/47438
After jest 28, `jest-environment-node` and `jest-environment-jsdom` need
to be installed by the user themselves, and the API has some breaking
changes, so this PR fix these issues to make the zone/jest integration
test code work as expected.
PR Close#47486
make sure that when an animation is used via the `useAnimation` function
and a delay has been provided then that delay gets correctly applied
(this PR is a follow up for #47285)
PR Close#47468
Previously, you could inspect the source code of a component but not a directive. This commit adds functionality to inspect source code for directives as well. Now you will see the inspect icon on the header component of each directive on a selected element.
PR Close#47334
Previously there was no existing issue template for users who want to open a feature request or bug report issue for Angular DevTools.
This commit addresses this by creating a new issue template for Angular DevTools.
PR Close#47383
use `text-top` instead of `top` for table cells verical alignment
so that the texts are correctly vertially aligned regardless on
the dom structure
resolves#47423
PR Close#47457
Expands the runtime to allow for basic host directives to be invoked within a template. This is achieved by making a second pass over the directives that were matched based on their selectors and producing a new array of directives that include host directives. Note that the ordering in the array is important, because it determines which host bindings and DI tokens will be overwritten.
PR Close#47430
This commit updates the location of the Image Directive guide link in the left navigation menu. Now the link is located under the Feature Preview section.
Also, this commit updates the Image Directive guides to add a highlighted message that the directive is in the developer preview mode.
PR Close#47466
Previously, the `Update AIO events` GitHub Action was using a version of
the `create-pr-for-changes` GitHub Action that relied on a GitHub App
key for Angular Robot. This, however, prevented PRs from being created
from the accounts fork.
Switch to a newer version of the `create-pr-for-changes` action that
uses a GitHub Personal Access Token instead.
PR Close#47452
We have some logic that generates the `InitialInputs` data structure by taking the static attributes of a node and looking them up in the `DirectiveDef.inputs` map to determine if they correspond to an input.
This works fine at the moment, but it will make it trickier to generate the correct `InitialInputs` for host directives, because the `DirectiveDef.inputs` entries might be aliased under a different name.
These changes rework the existing `generateInitialInputs` function so that it does its lookup on the remapped inputs that have accounted for the aliasing process already.
PR Close#47228
This commit updates the payload size for the Animations integration test app. The increase is likely is a result of a number of accumulated changes from various commits merged previously.
PR Close#47424
In a previous refactor, the `RootContext` was update to only contain a reference to a component. This commit perform further refactoring to get rid of the `RootContext` altogether, while storing component reference directly on the root view (without the `RootContext` wrapper).
PR Close#47056
make sure that when an animation is defined via the `animation` function
(and used via `useAnimation`) and a delay has been provided then that
delay gets correctly applied
resolves#47283
PR Close#47285
Use the `create-pr-for-changes` action of the `angular/dev-infra` repo,
instead of the `gkalpak/dev-infra` one. The latter was used during
development for debugging purposes during and was accidentally committed
to the repo.
PR Close#47410
This commit updates the `renderApplication`, `renderModule` and `renderModuleFactory` functions to append a special marker (in a form of an attribute, called `ng-server-context`) to the component host elements. This marker is needed to analyze how a page was rendered.
PR Close#47103
Updated methods' description verbs. They are sometimes used with the assumption of the 'it' pronoun and sometimes not. For instance, the verb 'to construct' is used with 's' in one method description and not others. It is the case for other verbs as well. This is also remarkable in the description of the built-in methods of FormArray.
PR Close#47399
replace deprecated --outFile option for ng extract-i18n
The `--outFile` command option was last used in Angular v10 (back when it was still `ng xi18n`), yet there are still references to it in the documentation, alongside the up-to-date option `--out-file`. This commit replaces all mentions to the incorrect option with the correct writing.
PR Close#47397
This commit introduces a new process for generating data for the AIO
[events page](https://angular.io/events), which streamlines the process
and minimizes duplication and manual work. For more details, see
`aio/scripts/generate-events/README.md`.
PR Close#45588