Compare commits

...

436 Commits

Author SHA1 Message Date
Jessica Janiuk c0a8c8fb4b release: cut the v16.0.3 release 2023-05-24 10:43:30 -07:00
Alan Agius 080bbd2137 fix(http): create macrotask during request handling instead of load start (#50406)
This commit schedules the macrotask creation to happen before the XHR `loadStart` event. This is needed as in some cases, Zone.js becomes stable too early.

With this commit, we also update the internal `createBackgroundMacroTask` method to use Zone.js `scheduleMacroTask` as otherwise the `setTimeout` would cause `fakeAsync` tests to fail due to pending timers.

Closes #50405

PR Close #50406
2023-05-24 15:33:43 +00:00
gdarnell 98e8fdf40e fix(core): fix Self flag inside embedded views with custom injectors (#50270)
When an embedded view injector is present anywhere above a node in the tree, the `Self` flag was effectively ignored. With this change, embedded view injectors are not checked at all when the `Self` flag is present, because resolution should stop at the current node before reaching any embedded view injector(s).

Fixes #49959

PR Close #50270
2023-05-24 13:59:20 +00:00
Matthieu Riegler f3a13c2d75 refactor(http): tree-shakable error on JSONP request (#50376)
This commit provides a tree shakable error message (+doc) when JSONP request is made without loading the `HttpClientJsonpModule`.

PR Close #50376
2023-05-24 13:58:49 +00:00
BrianDGLS 6e4f5821c2 refactor(devtools): run spellcheck on devtools dir (#50445)
Correct typos in devtools dir.

PR Close #50445
2023-05-24 13:56:56 +00:00
BrianDGLS 8f8e3cfd46 refactor(devtools): run spell check on tools dir (#50445)
Fix typo found in tools dir.

PR Close #50445
2023-05-24 13:56:56 +00:00
BrianDGLS 334238a83c refactor(router): run spell check on router package (#50445)
Fix typos in router package.

PR Close #50445
2023-05-24 13:56:56 +00:00
BrianDGLS efb897430f refactor(localize): run spell check on localize package (#50445)
Fix typo found in BUILD.bazel

PR Close #50445
2023-05-24 13:56:56 +00:00
BrianDGLS f245071fd7 refactor(zone.js): run spell check on zone.js package (#50445)
Fix typos found in zone.js CHANGELOG.md

PR Close #50445
2023-05-24 13:56:56 +00:00
Luís Martins ac0150f757 docs: fix first-app-lesson-06.md (#50419)
fix two grammatical/typographical errors present in the document.
Co-authored-by: Usama Nadeem <usamanadeem1991@gmail.com>

PR Close #50419
2023-05-23 19:45:15 +00:00
Jessica Janiuk c11041e372 fix(core): adds missing symbols for animation standalone bundling test (#50434)
This adds a few missing symbols into the goldens list that were causing CI to fail

PR Close #50434
2023-05-23 19:01:02 +00:00
Jessica Janiuk 4da2621cdb Revert "build: update babel dependencies to v7.21.9 (#50416)" (#50433)
This reverts commit 3c093d767e.

PR Close #50433
2023-05-23 18:28:32 +00:00
Paul Gschwendtner 338e63bae6 build: remove unused bash utilities from legacy build (#50427)
Removes an unused bash utility file that existed back when we
built using a Bash script.

PR Close #50427
2023-05-23 17:19:34 +00:00
Paul Gschwendtner 81eefacbc9 build: remove unused gulp helper script (#50428)
We still seem to be having Gulp installed for the ZoneJS changelog
generation. Arguably this can be replaced with a simpler JS script,
but in either case, this commit removes an unused file from the old
Gulp task setup.

PR Close #50428
2023-05-23 17:18:56 +00:00
Paul Gschwendtner 9a43f8da72 build: remove unused script from removed components CI job (#50429)
Removes a script that is no longer needed now that we have removed
the components repo CI job from the framework repository.

PR Close #50429
2023-05-23 17:18:27 +00:00
Greg Magolan bcf7eddf97 build: address last bit of review feedback for saucelabs daemon (#50430)
Follow-up to https://github.com/angular/angular/pull/50393.

PR Close #50430
2023-05-23 17:17:59 +00:00
Ivan Bakhtin 506db647a2 docs: fix console command parameters in first-app-lesson-10.md (#50390)
Lesson 11 proposes to add styles to the `details.component.css` file, which isn't created with the current command. The change brings the component creation to consistency with the other components in the first app tutorial.
PR Close #50390
2023-05-23 17:17:08 +00:00
Matthieu Riegler c33bbfe940 refactor(core): Improve NG100 (#50391)
Improve the NG100 error message by formating the value using `JSON.stringify`

See #34454

PR Close #50391
2023-05-23 15:31:18 +00:00
iklimisdev a806a8d582 docs: fix typo in NG0505 error guide (#50321)
PR Close #50321
2023-05-23 14:23:40 +00:00
Saba Shavidze 7e9c7eda49 docs: fix code-example header path in dependency-injection-in-action-md (#50397)
docs: fix typo in dependency-injection-in-action doc

docs: fixed code-example header paths in dependency-injection-in-action doc

PR Close #50397
2023-05-23 14:15:00 +00:00
Saba Shavidze 0b9855377d docs: fix code-example header path in hierarchical-dependency-injection-md file (#50404)
PR Close #50404
2023-05-23 14:14:27 +00:00
Matthieu Riegler 1bd65e42bb docs(docs-infra): remove polyfills.ts (#50409)
We can use the angular.json directly.

PR Close #50409
2023-05-23 14:13:40 +00:00
Mladen Jakovljević 9945da50d9 fix(docs-infra): remove extra slash from JSON-LD data (#50140)
Remove double slash from the "@id" field.

PR Close #50140
2023-05-23 14:13:10 +00:00
Greg Magolan 28c76c6a26 build: start only the minimum number of Saucelabs browsers required (#50393)
This should save on Saucelabs resources so that if only one saucelabs test is run then only one set of browsers will be started.

PR Close #50393
2023-05-23 14:12:29 +00:00
Angular Robot 0b086f4c58 build: update babel dependencies to v7.21.9 (#50416)
See associated pull request for more information.

PR Close #50416
2023-05-23 14:11:38 +00:00
Brian Douglas 7960a8b322 test(core): correct typo in signal_spec.ts (#50392)
Corrects a typo in the signal_spec.ts file.

PR Close #50392
2023-05-23 14:11:03 +00:00
Matthieu Riegler fe42ed1a19 refactor(core): Add a animation standalone example in the bundling test (#50413)
As a preliminary work for #50399, I'd like to add this test to see the effect of treeshaking that will be brought by the incomming refactoring of the AnimationModule.

This is animations test ported to standalone.

PR Close #50413
2023-05-23 14:10:31 +00:00
Jan Kuehle 4b3af3e20e refactor(compiler): remove convertIndexImportShorthand (#50343)
Remove convertIndexImportShorthand tsickle option. It's going to be
removed from tsickle in https://github.com/angular/tsickle/pull/1442.
`false` is the default value, so setting it here has no effect
currently.

PR Close #50343
2023-05-23 14:10:00 +00:00
alkavats1 f40ecc025b docs: replaced the html tags with the updated ones (#50403)
PR Close #50403
2023-05-22 17:36:33 +00:00
Matthieu Riegler 6fb0de6ce7 docs: improve AOT docs. (#50398)
Since v15, `protected` class member can be used in templates, Inputs & Outputs.

Other Decorated class members, like @HostBindings or Children queries can be private.

Fixes #27467

PR Close #50398
2023-05-22 17:34:46 +00:00
gdarnell 5574e47752 refactor: remove unnecessary array copying (#50370)
Removes `Array.from` and spread operators that have no functional effect.

PR Close #50370
2023-05-22 14:47:29 +00:00
gdarnell 47973bbd8c docs: clarify example instructions (#50371)
PR Close #50371
2023-05-22 14:45:28 +00:00
Matthieu Riegler 550a61eb01 docs: improve toh6 (#50375)
Create the file, then import it in the AppModule.

fixes #44073

PR Close #50375
2023-05-22 14:44:53 +00:00
Ivan Bakhtin 426ddfcd75 docs: fix typo in housing.service.ts first app lesson 13 (#50387)
PR Close #50387
2023-05-22 14:44:20 +00:00
Ivan Bakhtin 83ce682cda docs: fix typo in housing.service.ts lesson 12 (#50387)
PR Close #50387
2023-05-22 14:44:20 +00:00
Saba Shavidze 75f9fe675a docs: fix typo in dependency-injection-in-action doc (#50396)
PR Close #50396
2023-05-22 14:43:50 +00:00
Saba Shavidze 10dde9a5e7 docs: fix typo in dependency-injectoin-in-action.md (#50396)
PR Close #50396
2023-05-22 14:43:50 +00:00
alkavats1 82f56bc04a docs: improved the html tags information (#50400)
PR Close #50400
2023-05-22 14:43:17 +00:00
Sumit Parakh d963ecdf50 docs: added clarity in lifecycle event docs (#50145)
Closes #49686

Revert "docs(docs-infra): Remove unused annotation template (#50114)" (#50206)

This reverts commit a1ca162fd6.

This commit causes failures in g3, because `@Annotation` is load-bearing for
tsickle's decorator downleveling transformation.

PR Close #50206

refactor(compiler): generate ng-container instructions (#50008)

ElementContainer instructions refer to `ng-container` element tags, which don't produce corresponding DOM nodes. Much like element instructions, container instructions can also have their start and end tags combined.

Co-authored-by: Alex Rickabaugh <alxhub@users.noreply.github.com>
Co-authored-by: Andrew Scott <atscott@users.noreply.github.com>

PR Close #50008

refactor(compiler): handle binary operators (#50008)

We should be able to ingest binary operators. This involves parsing the left and right ASTs, and converting the operator string to a logical `BinaryOperator`.

Co-authored-by: Alex Rickabaugh <alxhub@users.noreply.github.com>

PR Close #50008

refactor(compiler): handle chains in event listeners (#50008)

It's possible to have chains of statements, exclusively in event listeners. A listener with a chain looks like the following:

```
(click)="onClick($event); 1 == 1"
```

We handle this by generating multiple statements, one for each expression in the chain, and only making the final statement the return statement. We place this logic in code specific to listeners, since they are the only place this construct can appear.

Co-authored-by: Alex Rickabaugh <alxhub@users.noreply.github.com>

PR Close #50008

refactor(compiler): generate property instructions for `ng-template` inputs (#50008)

When ingesting an `ng-template`, inputs might be on the `inputs` or the `templateAttrs` field. More investigation is required to pinpoint the specifics of `templateAttrs`.

For now, we can process them both and generate the appropriate update-mode property instructions.

Co-authored-by: Alex Rickabaugh <alxhub@users.noreply.github.com>

PR Close #50008

refactor(compiler): support `KeyedRead` expressions (#50008)

The compiler can now accept key read expressions (e.g. `foo[bar]`), where both the receiver and index are sub-expressions.

PR Close #50008

refactor(compiler): extract save/restore view logic to separate phase (#50008)

Saving and restoring the view is significant enough that it makes sense to handle it independently. This makes for easier reasoning about how view save/restore works.
Co-authored-by: Alex Rickabaugh <alxhub@users.noreply.github.com>

PR Close #50008

refactor(core): remove webworker related checks on `assertDomNode` (#50061)

Since the drop of the webworker platform the node can't be a `WebWorkerRenderNode`.

PR Close #50061

refactor(platform-server): import `xhr2` dynamically in the ServerXhr class (#50095)

This commit updates the `@angular/common/http` and `@angular/platform-server` packages to allow dynamic import of the `xhr2` dependency. The `xhr2` dependency has side-effects that rely on a global scope and as a result in some environments those side-effectful calls fail. With the changes from this PR, the import is delayed until it's actually needed, which gives a chance for the underlying platform to setup global scope (via shims) as needed.

Co-authored-by: alan-agius4 <17563226+alan-agius4@users.noreply.github.com>

PR Close #50095

build: remove unused deps (#50116)

* All `@types` package removed have typings in their package.
* brotli is unused
* tmp is unused
* vlq is unused

PR Close #50116

fix(core): bootstrapApplication call not rejected when error is thrown in importProvidersFrom module (#50120)

Fixes that the promise returned by `bootstrapApplication` wasn't being rejected when a module imported using `importProvidersFrom` throws an error. The problem was that the function that resolves the providers happens very early as the injector is being constructed.

Fixes #49923.

PR Close #50120

docs(forms): warn the user about getting old values and show how to avoid (#50123)
PR Close #50123

docs(forms): warn the user about getting old values and show how to avoid (#50123)

Co-authored-by: Andrew Kushnir <43554145+AndrewKushnir@users.noreply.github.com>
PR Close #50123

docs(forms): warn the user about getting old values and show how to avoid (#50123)

PR Close #50123

refactor(core): Throw an error when the document is not initialized. (#50143)

In case the document is accessed but not available we should throw ASAP an error to prevent non explicit errors.

PR Close #50143

fix(core): only try to retrieve transferred state on the browser (#50144)

Prior to this commit we tried to retrieve transferred state on both browser and server. Doing this on the server was redundant and could causes issues as `document` might be undefined.

Closes #50138

PR Close #50144

build: update dependency https-proxy-agent to v6 (#50152)

See associated pull request for more information.

PR Close #50152

docs: changed component name to home.component.ts in point 2 of step 3 (#50170)

PR Close #50170

docs: fix obs variable name to obs$ (#50196)

PR Close #50196

docs: Fixed Spelling 'servivce' to 'service' (#50204)

PR Close #50204

docs: fix filename in first-app (#50207)

Same mistake as #50204 but a different file.

PR Close #50207

refactor(core): Update CD traversal to use 'modes' (#50005)

Rather than maintaining separate traversal functions that act differently, this change
updates the change detection traversal to share more code and use different modes
to control the type of traversal being performed.

PR Close #50005

docs: delete aborted documentation files (#49962)

Those files were created as part of #47391 but the content was never merged.

PR Close #49962

refactor(compiler): Remove unused TransformVisitor & NullVisitor (#48646)

NullVisitor & TransformVisitor are unused and unexported outside the compiler package, we can remove them.

PR Close #48646

build: lock file maintenance (#49914)

See associated pull request for more information.

PR Close #49914

test(zone.js): update zone.js test for jasmine upgrade (#49914)

Update test cases to pass jasmine 6.x update.

PR Close #49914

refactor(common): cleanup platformLocation (#50054)

* Drop the usage of @Inject()
* Drop `supportsState` as its supported by evergreen browsers.

PR Close #50054

refactor(compiler): introduce internal transplanted type (#50104)

Adds a new AST for a `TransplantedType` in the compiler which will be used for some upcoming work. A transplanted type is a type node that is defined in one place in the app, but needs to be copied to a different one (e.g. the generated .d.ts). These changes also include updates to the type translator that will rewrite any type references within the type to point to the new context file.

PR Close #50104

build(devtools): make sure linker runs on fesm2022 bundles (#50086)

Since DevTools' Angular framework dependencies are built from local files, they are always up to date. [Recently](https://github.com/angular/angular/pull/49332) these dependencies started being published as fesm2022 instead of fesm2020. We also have an Angular dependency `ngx-flamegraph` that was built and published as fesm2020.

The easiest fix to make sure all of our Angular based dependencies are processed by the linker would be to update the filterPaths field in that file from `/fesm2020/` to `/fesm2020|fesm2022/`. When v16 releases, we can update ngx-flamegraph and publish it with the new APF, letting us change filterPaths to just `/fesm2022/`.

PR Close #50086

build(devtools): target es2020 explicitly (#50086)

We do this because of a bug caused by https://github.com/evanw/esbuild/issues/2950 and a recent change to how angular static properties are attached to class constructors. Targeting esnext or es2022 will cause the static initializer blocks that attach these static properties on class constructors to reference a class constructor variable that they do not have access to.

Because of this we explicitly target es2020 in our Angular DevTools builds.

PR Close #50086

docs: update releases guide for v16 (#50128)

Also clarify that the deprecations guide is for _noteworthy_ deprecations and may not be comprehensive.

PR Close #50128

docs: update starter lesson to contain example images from the start (#50212)

We received feedback that the starter lesson should also include the stock images.

PR Close #50212

fix(core): handle hydration of root components with injected ViewContainerRef (#50136)

This commit fixes an issue where a root component with an injected ViewContainerRef (for ex. `inject(ViewContainerRef)`) was triggering a certain code path during hydration which didn't handle this case correctly.

Resolves #50133.

PR Close #50136

feat(core): support TypeScript 5.1 (#50156)

Updates the project to support building with TypeScript 5.1.

PR Close #50156

docs: standalone component preloading config (#50193)

The preloading modules documentation were missing information about how to apply preloading strategies to standalone application  ( `ng new AppName --standalone` ).
Feel free to fix anything not in line with the Angular documentation style guide, as this is my first attempt at contributing :)

- Added example for `app.config.ts` providing info on the `withPreloading(<preloading strategy>)` you can add to the `provideRouter()` RouterFeatures.
- Specified that preloading modules also applies for standalone components.
PR Close #50193

refactor(router): remove private export of `withPreloading` (#50194)

`withPreloading` is part of the public API.

PR Close #50194

fix(core): handle projection of hydrated containters into components that skip hydration (#50199)

This commit updates hydration logic to support a scenario where a view container that was hydrated and later on projected to a component that skips hydration. Currently, such projected content is extracted from the DOM (since a component that skips hydration needs to be re-created), but never added back, since the current logic treats such content as "already inserted".

Closes #50175.

PR Close #50199

fix(core): add additional component metadata to component ID generation (#50203)

This commit add `exportAs`, `signals`, `inputs` and `outputs` into account when generating a component ID.

See: https://github.com/angular/angular/issues/50158#issuecomment-1537061939

PR Close #50203

docs: fix link label. (#50209)

Removing a duplicate https protocol.

PR Close #50209

docs: fix typos on first-app tutorial (#50211)

PR Close #50211

refactor(core): drop `next` prefix from hydration guide link (#50214)

This commit updates the content of the console log to drop the `next.` prefix from hydration guide link.

PR Close #50214

build: update github/codeql-action action to v2.3.3 (#50216)

See associated pull request for more information.

PR Close #50216

docs(docs-infra): Remove warning for `@Annotation`. (#50218)

Per #50206, `@Annotation` is needed for tsickle. This commit removes the warning "Invalid tags found" produced by dgeni for the annotation decorator.

PR Close #50218

docs: fix typo on hydration in Preserve Whitespaces Configuration (#50236)
PR Close #50236

docs: release notes for the v16.0.1 release

release: cut the v16.1.0-next.0 release

refactor(core): simplify state transfer escaping (#50201)

This commit removes unnecessary transfer state escaping and updates this process to be done by the means of a `replacer` and `reviver` method as this removes the need to export the escaping and unescaping methods.

The only thing that we need to escape is `<script` and `</script` which are done by the browsers, but not Node.js.

PR Close #50201

build: lock file maintenance (#50227)

See associated pull request for more information.

(cherry picked from commit d5f92bdd64)

PR Close #50227

refactor: remove unused benchmarks (#50108)

The benchmarks in the 'old' directory are not used / maintained.

PR Close #50108

refactor: remove benchpres tests for other frameworks (#50108)

Some of the benchpress tests were written against other UI
frameworks (ex.: incremental DOM, initial version of ivy)
and those frameworks are no longer a valuable comparision target.

PR Close #50108

docs(docs-infra): Warning message when using absolute links to aio in the documentation (#50213)

This commit adds a processor to check for absolute links to angular.io. Absolute links to aio should be avoided because they will appear as external links.

PR Close #50213

docs: replace absolute links to aio with relative links. (#50213)

This change follows the introduction of the warning message from a transform processor to prevent absolute links to angular.io.

PR Close #50213

refactor(elements): remove unnecessary polyfill deps (#50115)

`webcomponents/custom-elements` and `document-register-element` are unnecessary now that we support only evergreen browsers.

PR Close #50115

build: update dependency firebase-tools to v12 (#50223)

See associated pull request for more information.

PR Close #50223

fix(core): allow onDestroy unregistration while destroying (#50237)

Ensure that all onDestroy callbacks are called by allowing unregistering of onDestroy hooks while destroying.

Fixes #50221

PR Close #50237

docs: fix v13 dependencies versions. (#50243)

Fixing a small mistake.

Fixes #50242

PR Close #50243

docs: split unsupported versions table in two. (#50243)

To ease the maintenance of this table and keep the same number of columns between active and unsupported versions.

PR Close #50243

build: bump in-memory-web-api dependency versions (#50246)

This commit updates in-memory-web-api package versions from v15 -> v16.

PR Close #50246

build: lock file maintenance (#49879)

See associated pull request for more information.

PR Close #49879

docs: update Angular CLI help [main] (#50256)

Updated Angular CLI help contents.

PR Close #50256

docs: fix mistake in tutorial (#50261)

PR Close #50261

build: update dependency @rollup/plugin-commonjs to v25 (#50264)

See associated pull request for more information.

PR Close #50264

docs: add missing "when" (#50262)
PR Close #50262

fix(docs-infra): labels with links should have the same font weight (#50258)

Fix anchor tag styling inside label.api-status-label to match font weight of label styling that does not have anchor tag.

PR Close #50258

build: update all non-major dependencies (#50217)

See associated pull request for more information.

PR Close #50217

build: share Saucelabs browsers between karma test targets using background Saucelabs daemon and custom karma launcher (#49200)

This upgrades the Saucelabs Bazel step on CI to use the more efficient Saucelabs daemon

PR Close #49200

build: address review feedback; added scripts/test/run-saucelabs-tests.sh script for local testing (#49200)

more chars to meet the linters requirements

PR Close #49200

build: address review feedback; should be ready to land now... additional chars to meet commit msg formatting requirements (#49200)

plus more additional chars here

PR Close #49200

build: don't run saucelabs tests yet on PRs... that will happen in a followup (#49200)

additional test to make linter happy

PR Close #49200

refactor(core): remove legacy way of preventing default actions (#50257)

Setting `returnValue = false` to prevent the default action of events hasn't been necessary since IE9.

PR Close #50257

docs: fix inconsistencies in getting started (#50275)

Fixes #50274

PR Close #50275

docs: fix mistake in first-app-lesson-03 (#50278)

The correct filename is `home.component.ts`.

fixes #50277

PR Close #50278

docs(docs-infra): Remove internal constructors from the doc. (#50282)

Internal constructor should not be exposed in the doc. This removes them.

Related to #50281

PR Close #50282

docs(docs-infra): Add a deprecated label to APIs (#50287)

This adds a deprecated label next to the other labels on the API pages for methods & properties.

Fixes #44265

PR Close #50287

docs: Glossary link to N (#50294)

The shortcut to N was missing resulting in a rendering issue.

PR Close #50294

docs: add Enea to GDE contributors list (#50254)

PR Close #50254

docs: update events (#50309)

Generated `events.json` with the latest events retrieved from the Firebase DB.

PR Close #50309

fix(core): allow passing value of any type to `isSignal` function (#50035)

Unlike the current signature where the input argument must a function, this change allows an input of any type to be passed to the `isSignal` function.

PR Close #50035

refactor(common): Reduce the precision to 2 digits in the ngOptimizedImage distortion warning message (#50276)

Using toFixed().

fixes #50273

PR Close #50276

refactor(core): Improve `ExpressionChangedAfterItHasBeenCheckedError` (#50286)

Related to #50272 and #18970, this improves the error message of NG100 by including the class name of the component where the error was triggered.

PR Close #50286

refactor(forms): remove unnecessary Array.from (#50314)

The Array.from isn't necessary since we're just iterating over the map keys.

PR Close #50314

docs: updated 'conceptual preview' title (#50326)
PR Close #50326

docs: fix typo in NG0912 error guide (#50322)
PR Close #50322

docs: fix typo in dependency injection guide (#50323)
PR Close #50323

docs: fix typo in security guide (#50324)
PR Close #50324

Revert "fix(core): add additional component metadata to component ID generation (#50203)" (#50334)

This reverts commit 52c74d3b4a.

The reason for revert: breaking some apps in Google's codebase.

PR Close #50334

docs: added wiki link for domain model (#50180)

Closes #49570

PR Close #50180

build: update all non-major dependencies (#50316)

See associated pull request for more information.

PR Close #50316

docs: update live demo for change detector (#50328)

fixes #44553

PR Close #50328

docs: remove plnkr link from markForCheck example (#50328)

PR Close #50328

refactor(core): Add a warning when `ApplicationRef.isStable` doesn't emit `true` (#50295)

Hydration requires a stable App to run some logic.
With this warning developers will be informed about potential issues encountered when running an unstable app.

Fixes #50285

PR Close #50295

fix(core): add additional component metadata to component ID generation (#50336)

This commit add `exportAs`, `signals`, `inputs` and `outputs` into account when generating a component ID.

Co-authored-by: alan-agius4 <17563226+alan-agius4@users.noreply.github.com>

PR Close #50336

docs: release notes for the v16.0.2 release

release: cut the v16.1.0-next.1 release

docs: fixed typo

PR Close #50145
2023-05-19 16:38:29 +00:00
Matthieu Riegler 8667f4a8a1 docs: ngComponentOutlet doc with projected template (#50173)
Give an example of projected content by a component outlet with ng-templates

PR Close #50173
2023-05-19 16:35:48 +00:00
garrettld fc18b101a8 docs: replace blossom emoji with tulip (#50349)
The blossom emoji is referred to as "yellow flower" in the docs, but it's not yellow on all platforms. Since "flower" or "blossom" is too generic, the "tulip" emoji is used instead.

Fixes #50347

PR Close #50349
2023-05-19 16:26:27 +00:00
Matthieu Riegler 14588ab10d docs: forwardref usage for standalone components (#50366)
Fixes #48614 and #49059

PR Close #50366
2023-05-19 15:10:29 +00:00
Kristiyan Kostadinov 199ff4fe7f fix(core): host directives incorrectly validating aliased bindings (#50364)
Fixes that the host directives feature was incorrectly throwing the conflicting alias error when an aliased binding was being exposed under the same alias.

Fixes #48951.

PR Close #50364
2023-05-19 15:09:48 +00:00
Dove b89fae173e docs(language-service): correction of the demonstration translation (#50359)
In this context the demonstrative determiner is too much.
https://francais.lingolia.com/en/grammar/pronouns/demonstrative-pronouns
PR Close #50359
2023-05-19 14:20:30 +00:00
aanchal 848e37c63e docs: remove unused oninit method (#50353)
PR Close #50353
2023-05-19 14:19:59 +00:00
Angular Robot f99d4e8541 build: update babel dependencies (#48273)
See associated pull request for more information.

PR Close #48273
2023-05-19 14:19:19 +00:00
Angular Robot aa5ed31dc8 build: update dependency google-closure-compiler to v20230502 (#50153)
See associated pull request for more information.

PR Close #50153
2023-05-19 14:18:36 +00:00
Matthieu Riegler 2d3dc4a848 docs(docs-infra): Drop ngcli-compat (#50345)
The `ng-cli-compat` rules have been removed from `angular-eslint` v16. This commit will allow to merge #50139.

PR Close #50345
2023-05-18 14:12:06 +00:00
Andrew Kushnir c92220a5f9 release: cut the v16.0.2 release 2023-05-17 11:32:19 -07:00
Andrew Kushnir c1016d4e57 fix(core): add additional component metadata to component ID generation (#50340)
This commit add `exportAs`, `signals`, `inputs` and `outputs` into account when generating a component ID.

Co-authored-by: alan-agius4 <17563226+alan-agius4@users.noreply.github.com>

PR Close #50340
2023-05-17 09:28:49 -07:00
Matthieu Riegler 5bf1abffea refactor(core): Add a warning when ApplicationRef.isStable doesn't emit true (#50295)
Hydration requires a stable App to run some logic.
With this warning developers will be informed about potential issues encountered when running an unstable app.

Fixes #50285

PR Close #50295
2023-05-17 08:45:27 -07:00
Naaajii 656c9537f0 docs: remove plnkr link from markForCheck example (#50328)
PR Close #50328
2023-05-17 08:13:55 -07:00
Naaajii e56b5f5fa5 docs: update live demo for change detector (#50328)
fixes #44553

PR Close #50328
2023-05-17 08:13:55 -07:00
Angular Robot b264736323 build: update all non-major dependencies (#50316)
See associated pull request for more information.

PR Close #50316
2023-05-17 08:13:13 -07:00
Sumit Parakh 27b707a33e docs: added wiki link for domain model (#50180)
Closes #49570

PR Close #50180
2023-05-17 08:12:22 -07:00
Andrew Kushnir 3eafb4b470 Revert "fix(core): add additional component metadata to component ID generation (#50203)" (#50335)
This reverts commit 52c74d3b4a.

The reason for revert: this change is breaking some targets in g3.

PR Close #50335
2023-05-16 13:37:32 -07:00
Andrew Kushnir 4c5c0542e9 Revert "refactor(core): avoid using def.signal during component id computation (#50238)" (#50335)
This reverts commit c9657bdb88.

The reason for revert: this change is breaking some targets in g3.

PR Close #50335
2023-05-16 13:37:32 -07:00
Aristeidis Bampakos b75625ba49 docs: fix typo in security guide (#50324)
PR Close #50324
2023-05-16 09:47:26 -07:00
Aristeidis Bampakos e82f12ee06 docs: fix typo in dependency injection guide (#50323)
PR Close #50323
2023-05-16 09:44:30 -07:00
Aristeidis Bampakos e4176a420d docs: fix typo in NG0912 error guide (#50322)
PR Close #50322
2023-05-16 09:43:54 -07:00
Asheer Rizvi 28454f87e3 docs: updated 'conceptual preview' title (#50326)
PR Close #50326
2023-05-16 09:27:56 -07:00
gdarnell f3e67749b7 refactor(forms): remove unnecessary Array.from (#50314)
The Array.from isn't necessary since we're just iterating over the map keys.

PR Close #50314
2023-05-16 09:25:27 -07:00
Matthieu Riegler e68a774e9f refactor(core): Improve ExpressionChangedAfterItHasBeenCheckedError (#50286)
Related to #50272 and #18970, this improves the error message of NG100 by including the class name of the component where the error was triggered.

PR Close #50286
2023-05-16 09:24:51 -07:00
Matthieu Riegler cc964f8789 refactor(common): Reduce the precision to 2 digits in the ngOptimizedImage distortion warning message (#50276)
Using toFixed().

fixes #50273

PR Close #50276
2023-05-16 09:23:16 -07:00
markostanimirovic 7d679bdb59 fix(core): allow passing value of any type to isSignal function (#50035)
Unlike the current signature where the input argument must a function, this change allows an input of any type to be passed to the `isSignal` function.

PR Close #50035
2023-05-16 09:22:06 -07:00
Angular Robot bd4f64d8d9 docs: update events (#50309)
Generated `events.json` with the latest events retrieved from the Firebase DB.

PR Close #50309
2023-05-15 10:44:07 -07:00
Enea Jahollari bf4a466820 docs: add Enea to GDE contributors list (#50254)
PR Close #50254
2023-05-15 10:43:08 -07:00
Matthieu Riegler 2d87aeecc1 docs: Glossary link to N (#50294)
The shortcut to N was missing resulting in a rendering issue.

PR Close #50294
2023-05-15 09:55:59 -07:00
Matthieu Riegler 37acd37777 docs(docs-infra): Add a deprecated label to APIs (#50287)
This adds a deprecated label next to the other labels on the API pages for methods & properties.

Fixes #44265

PR Close #50287
2023-05-15 09:31:00 -07:00
Matthieu Riegler 9495c8c6eb docs(docs-infra): Remove internal constructors from the doc. (#50282)
Internal constructor should not be exposed in the doc. This removes them.

Related to #50281

PR Close #50282
2023-05-15 09:24:59 -07:00
Matthieu Riegler 7a344542db docs: fix mistake in first-app-lesson-03 (#50278)
The correct filename is `home.component.ts`.

fixes #50277

PR Close #50278
2023-05-15 09:24:06 -07:00
Matthieu Riegler 88da6a518c docs: fix inconsistencies in getting started (#50275)
Fixes #50274

PR Close #50275
2023-05-15 09:23:18 -07:00
Kristiyan Kostadinov fa2ef506e5 refactor(core): remove legacy way of preventing default actions (#50257)
Setting `returnValue = false` to prevent the default action of events hasn't been necessary since IE9.

PR Close #50257
2023-05-15 09:22:34 -07:00
Greg Magolan 4b036128c7 build: don't run saucelabs tests yet on PRs... that will happen in a followup (#49200)
additional test to make linter happy

PR Close #49200
2023-05-15 09:21:48 -07:00
Greg Magolan 62beab793d build: address review feedback; should be ready to land now... additional chars to meet commit msg formatting requirements (#49200)
plus more additional chars here

PR Close #49200
2023-05-15 09:21:47 -07:00
Greg Magolan ebcb766300 build: address review feedback; added scripts/test/run-saucelabs-tests.sh script for local testing (#49200)
more chars to meet the linters requirements

PR Close #49200
2023-05-15 09:21:47 -07:00
Greg Magolan 15b5a7baab build: share Saucelabs browsers between karma test targets using background Saucelabs daemon and custom karma launcher (#49200)
This upgrades the Saucelabs Bazel step on CI to use the more efficient Saucelabs daemon

PR Close #49200
2023-05-15 09:21:47 -07:00
Angular Robot ee081217de build: update all non-major dependencies (#50217)
See associated pull request for more information.

PR Close #50217
2023-05-12 12:56:25 -07:00
Mladen Jakovljević 21199f8086 fix(docs-infra): labels with links should have the same font weight (#50258)
Fix anchor tag styling inside label.api-status-label to match font weight of label styling that does not have anchor tag.

PR Close #50258
2023-05-12 10:20:23 -07:00
Arnel Umandap Jr 81185e0afd docs: add missing "when" (#50262)
PR Close #50262
2023-05-12 10:17:22 -07:00
Angular Robot 14c59d41b4 build: update dependency @rollup/plugin-commonjs to v25 (#50264)
See associated pull request for more information.

PR Close #50264
2023-05-12 10:15:12 -07:00
0b01001110 a3dd3bcfaa docs: fix mistake in tutorial (#50261)
PR Close #50261
2023-05-12 10:14:30 -07:00
Angular Robot 4a7ebf4037 build: lock file maintenance (#49879)
See associated pull request for more information.

PR Close #49879
2023-05-11 14:27:02 -07:00
Tyler Vorpahl 41fdfa5fb7 build: bump in-memory-web-api dependency versions (#50246)
This commit updates in-memory-web-api package versions from v15 -> v16.

PR Close #50246
2023-05-11 14:26:02 -07:00
Matthieu Riegler d5be23efd4 docs: split unsupported versions table in two. (#50243)
To ease the maintenance of this table and keep the same number of columns between active and unsupported versions.

PR Close #50243
2023-05-11 10:17:52 -07:00
Matthieu Riegler 2333947753 docs: fix v13 dependencies versions. (#50243)
Fixing a small mistake.

Fixes #50242

PR Close #50243
2023-05-11 10:17:52 -07:00
gdarnell cc41758b59 fix(core): allow onDestroy unregistration while destroying (#50237)
Ensure that all onDestroy callbacks are called by allowing unregistering of onDestroy hooks while destroying.

Fixes #50221

PR Close #50237
2023-05-11 10:17:07 -07:00
Angular Robot 74099d4554 build: update dependency firebase-tools to v12 (#50223)
See associated pull request for more information.

PR Close #50223
2023-05-10 14:36:00 -07:00
Matthieu Riegler eef9244596 refactor(elements): remove unnecessary polyfill deps (#50115)
`webcomponents/custom-elements` and `document-register-element` are unnecessary now that we support only evergreen browsers.

PR Close #50115
2023-05-10 14:32:37 -07:00
Matthieu Riegler 1f4bc47fae docs: replace absolute links to aio with relative links. (#50213)
This change follows the introduction of the warning message from a transform processor to prevent absolute links to angular.io.

PR Close #50213
2023-05-10 14:29:51 -07:00
Matthieu Riegler ce96503c5f docs(docs-infra): Warning message when using absolute links to aio in the documentation (#50213)
This commit adds a processor to check for absolute links to angular.io. Absolute links to aio should be avoided because they will appear as external links.

PR Close #50213
2023-05-10 14:29:50 -07:00
Pawel Kozlowski 56dcffb8d3 refactor: remove benchpres tests for other frameworks (#50108)
Some of the benchpress tests were written against other UI
frameworks (ex.: incremental DOM, initial version of ivy)
and those frameworks are no longer a valuable comparision target.

PR Close #50108
2023-05-10 14:29:11 -07:00
Pawel Kozlowski c754c488bd refactor: remove unused benchmarks (#50108)
The benchmarks in the 'old' directory are not used / maintained.

PR Close #50108
2023-05-10 14:29:11 -07:00
Alan Agius 9005717b7e build: lock file maintenance (#50227)
See associated pull request for more information.

(cherry picked from commit d5f92bdd64)

PR Close #50227
2023-05-10 11:32:44 -07:00
Alan Agius eea11d5e5f refactor(core): simplify state transfer escaping (#50201)
This commit removes unnecessary transfer state escaping and updates this process to be done by the means of a `replacer` and `reviver` method as this removes the need to export the escaping and unescaping methods.

The only thing that we need to escape is `<script` and `</script` which are done by the browsers, but not Node.js.

PR Close #50201
2023-05-10 11:31:35 -07:00
Andrew Kushnir b9aeb858d5 release: cut the v16.0.1 release 2023-05-10 11:14:11 -07:00
Andrew Kushnir c9657bdb88 refactor(core): avoid using def.signal during component id computation (#50238)
This commit updates the code in 16.0.x branch to avoid using the `def.signals` field on a component, while calculating component id. The `signal` field was introduced later and will be available in 16.1.0.

PR Close #50238
2023-05-10 10:45:36 -07:00
Ambroise BAZIE 868723c084 docs: fix typo on hydration in Preserve Whitespaces Configuration (#50236)
PR Close #50236
2023-05-10 10:35:07 -07:00
Matthieu Riegler bf23404c04 docs(docs-infra): Remove warning for @Annotation. (#50218)
Per #50206, `@Annotation` is needed for tsickle. This commit removes the warning "Invalid tags found" produced by dgeni for the annotation decorator.

PR Close #50218
2023-05-09 14:49:26 -07:00
Angular Robot 351c6317be build: update github/codeql-action action to v2.3.3 (#50216)
See associated pull request for more information.

PR Close #50216
2023-05-09 14:48:54 -07:00
Andrew Kushnir 2abcb74d4b refactor(core): drop next prefix from hydration guide link (#50214)
This commit updates the content of the console log to drop the `next.` prefix from hydration guide link.

PR Close #50214
2023-05-09 14:48:28 -07:00
emartinez 87685914f5 docs: fix typos on first-app tutorial (#50211)
PR Close #50211
2023-05-09 14:47:55 -07:00
Matthieu Riegler 087b08b5fe docs: fix link label. (#50209)
Removing a duplicate https protocol.

PR Close #50209
2023-05-09 14:47:09 -07:00
Alan Agius 52c74d3b4a fix(core): add additional component metadata to component ID generation (#50203)
This commit add `exportAs`, `signals`, `inputs` and `outputs` into account when generating a component ID.

See: https://github.com/angular/angular/issues/50158#issuecomment-1537061939

PR Close #50203
2023-05-09 14:46:42 -07:00
Andrew Kushnir f751ce6445 fix(core): handle projection of hydrated containters into components that skip hydration (#50199)
This commit updates hydration logic to support a scenario where a view container that was hydrated and later on projected to a component that skips hydration. Currently, such projected content is extracted from the DOM (since a component that skips hydration needs to be re-created), but never added back, since the current logic treats such content as "already inserted".

Closes #50175.

PR Close #50199
2023-05-09 14:46:03 -07:00
Matthieu Riegler bb8fb10194 refactor(router): remove private export of withPreloading (#50194)
`withPreloading` is part of the public API.

PR Close #50194
2023-05-09 14:45:30 -07:00
Peter fafcb125ef docs: standalone component preloading config (#50193)
The preloading modules documentation were missing information about how to apply preloading strategies to standalone application  ( `ng new AppName --standalone` ).
Feel free to fix anything not in line with the Angular documentation style guide, as this is my first attempt at contributing :)

- Added example for `app.config.ts` providing info on the `withPreloading(<preloading strategy>)` you can add to the `provideRouter()` RouterFeatures.
- Specified that preloading modules also applies for standalone components.
PR Close #50193
2023-05-09 14:44:55 -07:00
Andrew Kushnir d68796782f fix(core): handle hydration of root components with injected ViewContainerRef (#50136)
This commit fixes an issue where a root component with an injected ViewContainerRef (for ex. `inject(ViewContainerRef)`) was triggering a certain code path during hydration which didn't handle this case correctly.

Resolves #50133.

PR Close #50136
2023-05-09 14:43:45 -07:00
Mark Thompson d0023d9a90 docs: update starter lesson to contain example images from the start (#50212)
We received feedback that the starter lesson should also include the stock images.

PR Close #50212
2023-05-09 14:43:15 -07:00
Jeremy Elbourn d077c44bdc docs: update releases guide for v16 (#50128)
Also clarify that the deprecations guide is for _noteworthy_ deprecations and may not be comprehensive.

PR Close #50128
2023-05-09 14:42:16 -07:00
AleksanderBodurri d73d1b0ab0 build(devtools): target es2020 explicitly (#50086)
We do this because of a bug caused by https://github.com/evanw/esbuild/issues/2950 and a recent change to how angular static properties are attached to class constructors. Targeting esnext or es2022 will cause the static initializer blocks that attach these static properties on class constructors to reference a class constructor variable that they do not have access to.

Because of this we explicitly target es2020 in our Angular DevTools builds.

PR Close #50086
2023-05-09 14:41:49 -07:00
AleksanderBodurri 7031d8ca82 build(devtools): make sure linker runs on fesm2022 bundles (#50086)
Since DevTools' Angular framework dependencies are built from local files, they are always up to date. [Recently](https://github.com/angular/angular/pull/49332) these dependencies started being published as fesm2022 instead of fesm2020. We also have an Angular dependency `ngx-flamegraph` that was built and published as fesm2020.

The easiest fix to make sure all of our Angular based dependencies are processed by the linker would be to update the filterPaths field in that file from `/fesm2020/` to `/fesm2020|fesm2022/`. When v16 releases, we can update ngx-flamegraph and publish it with the new APF, letting us change filterPaths to just `/fesm2022/`.

PR Close #50086
2023-05-09 14:41:49 -07:00
Kristiyan Kostadinov 25756e8b77 refactor(compiler): introduce internal transplanted type (#50104)
Adds a new AST for a `TransplantedType` in the compiler which will be used for some upcoming work. A transplanted type is a type node that is defined in one place in the app, but needs to be copied to a different one (e.g. the generated .d.ts). These changes also include updates to the type translator that will rewrite any type references within the type to point to the new context file.

PR Close #50104
2023-05-09 14:41:16 -07:00
Matthieu Riegler bc65112375 refactor(common): cleanup platformLocation (#50054)
* Drop the usage of @Inject()
* Drop `supportsState` as its supported by evergreen browsers.

PR Close #50054
2023-05-09 14:39:22 -07:00
JiaLiPassion 258de81305 test(zone.js): update zone.js test for jasmine upgrade (#49914)
Update test cases to pass jasmine 6.x update.

PR Close #49914
2023-05-09 14:38:48 -07:00
Angular Robot 5c593d58a1 build: lock file maintenance (#49914)
See associated pull request for more information.

PR Close #49914
2023-05-09 14:38:47 -07:00
Matthieu Riegler 62c8b3cdbf refactor(compiler): Remove unused TransformVisitor & NullVisitor (#48646)
NullVisitor & TransformVisitor are unused and unexported outside the compiler package, we can remove them.

PR Close #48646
2023-05-09 14:38:10 -07:00
Matthieu Riegler 63112f9b36 docs: delete aborted documentation files (#49962)
Those files were created as part of #47391 but the content was never merged.

PR Close #49962
2023-05-09 14:36:16 -07:00
Matthieu Riegler fe653c2141 docs: fix filename in first-app (#50207)
Same mistake as #50204 but a different file.

PR Close #50207
2023-05-08 14:47:29 -07:00
Shivam Katoch c098ae1542 docs: Fixed Spelling 'servivce' to 'service' (#50204)
PR Close #50204
2023-05-08 14:44:59 -07:00
WILLY FALONE KOUADIO 22c7bd9f6c docs: fix obs variable name to obs$ (#50196)
PR Close #50196
2023-05-08 14:43:03 -07:00
Ossama Rafique beae3e028a docs: changed component name to home.component.ts in point 2 of step 3 (#50170)
PR Close #50170
2023-05-08 14:41:02 -07:00
Angular Robot 618804b0a7 build: update dependency https-proxy-agent to v6 (#50152)
See associated pull request for more information.

PR Close #50152
2023-05-08 14:36:55 -07:00
Alan Agius 346ab73dd9 fix(core): only try to retrieve transferred state on the browser (#50144)
Prior to this commit we tried to retrieve transferred state on both browser and server. Doing this on the server was redundant and could causes issues as `document` might be undefined.

Closes #50138

PR Close #50144
2023-05-08 14:36:13 -07:00
Matthieu Riegler 1686c25955 refactor(core): Throw an error when the document is not initialized. (#50143)
In case the document is accessed but not available we should throw ASAP an error to prevent non explicit errors.

PR Close #50143
2023-05-08 14:35:39 -07:00
Samir fe31c9c1a7 docs(forms): warn the user about getting old values and show how to avoid (#50123)
PR Close #50123
2023-05-08 14:34:55 -07:00
Samir 25b6ec67f1 docs(forms): warn the user about getting old values and show how to avoid (#50123)
Co-authored-by: Andrew Kushnir <43554145+AndrewKushnir@users.noreply.github.com>
PR Close #50123
2023-05-08 14:34:55 -07:00
Samir e7d626a44a docs(forms): warn the user about getting old values and show how to avoid (#50123)
PR Close #50123
2023-05-08 14:34:55 -07:00
Kristiyan Kostadinov 048b6b1e0d fix(core): bootstrapApplication call not rejected when error is thrown in importProvidersFrom module (#50120)
Fixes that the promise returned by `bootstrapApplication` wasn't being rejected when a module imported using `importProvidersFrom` throws an error. The problem was that the function that resolves the providers happens very early as the injector is being constructed.

Fixes #49923.

PR Close #50120
2023-05-08 14:33:45 -07:00
Matthieu Riegler 21c857b659 build: remove unused deps (#50116)
* All `@types` package removed have typings in their package.
* brotli is unused
* tmp is unused
* vlq is unused

PR Close #50116
2023-05-08 14:33:21 -07:00
Andrew Kushnir d686d15c4e refactor(platform-server): import xhr2 dynamically in the ServerXhr class (#50095)
This commit updates the `@angular/common/http` and `@angular/platform-server` packages to allow dynamic import of the `xhr2` dependency. The `xhr2` dependency has side-effects that rely on a global scope and as a result in some environments those side-effectful calls fail. With the changes from this PR, the import is delayed until it's actually needed, which gives a chance for the underlying platform to setup global scope (via shims) as needed.

Co-authored-by: alan-agius4 <17563226+alan-agius4@users.noreply.github.com>

PR Close #50095
2023-05-08 14:32:43 -07:00
Matthieu Riegler a9c6015557 refactor(core): remove webworker related checks on assertDomNode (#50061)
Since the drop of the webworker platform the node can't be a `WebWorkerRenderNode`.

PR Close #50061
2023-05-08 14:30:40 -07:00
Alex Rickabaugh da7ff37dc9 Revert "docs(docs-infra): Remove unused annotation template (#50114)" (#50206)
This reverts commit a1ca162fd6.

This commit causes failures in g3, because `@Annotation` is load-bearing for
tsickle's decorator downleveling transformation.

PR Close #50206
2023-05-08 09:45:36 -07:00
Matthieu Riegler 2f03eefd5c refactor(platform-browser): Throw tree-shakable errors. (#49341)
In a effort to have more tree-shakable errors, this commit transforms every `Error` into a tree-shakable `RuntimeError`

PR Close #49341
2023-05-04 12:21:20 +02:00
Matthieu Riegler f28580a42b build: remove the webworker platform. (#50059)
The webworker platform was droped in v11.

PR Close #50059
2023-05-04 09:06:55 +02:00
Matthieu Riegler 0d8d62fa92 docs(docs-infra): remove remainings of the webworker platform. (#50059)
The webworker platform was droped in v11.

PR Close #50059
2023-05-04 09:06:55 +02:00
Matthieu Riegler 9f332b5c87 docs: remove mentions of the WebWorker platform (#50059)
The webworker platform was dropped in v11.

PR Close #50059
2023-05-04 09:06:55 +02:00
Walid Bouguima 68e6704d25 docs: fix takeUntilDestroyed description's typo (#50134)
PR Close #50134
2023-05-04 09:03:34 +02:00
Matthieu Riegler 834fe5c45f refactor(animations): remove circular deps (#50049)
`AnimationDriver` was not used in shared.ts.

PR Close #50049
2023-05-04 08:58:25 +02:00
Kristiyan Kostadinov 97d56f85a3 refactor(compiler): reflect arrow function definition (#50084)
Adds some logic to reflect an arrow function to `ReflectionHost.getDefinitionOfFunction`. This will be useful for some upcoming work.

PR Close #50084
2023-05-04 08:56:24 +02:00
Andrew Kushnir 431b922bd8 refactor(core): minor updates to TestBed error messages (#50072)
This commit updates TestBed error messages to avoid using `R3TestBed` reference and just use `TestBed` instead.

PR Close #50072
2023-05-04 08:53:05 +02:00
Angular Robot a822b8021c build: update dependency puppeteer-core to v20 (#50112)
See associated pull request for more information.

PR Close #50112
2023-05-04 08:50:35 +02:00
Angular Robot e0a2cfc46b build: update eslint dependencies to v5.59.2 (#50101)
See associated pull request for more information.

PR Close #50101
2023-05-04 08:46:37 +02:00
Sumit Parakh e45e78a9f6 docs: improve cli docs (#50119)
Closes #50078

PR Close #50119
2023-05-04 08:42:29 +02:00
Jens Kuehlers eb7af6115e docs: add jens to contributors (#50122)
PR Close #50122
2023-05-04 08:40:35 +02:00
mgechev 9f696b8bb2 docs: fix roadmap structure and remove redundant title (#50137)
PR Close #50137
2023-05-04 08:38:32 +02:00
Alex Rickabaugh f3bb68034e docs: add the v16 blog post link to the changelog (#50132)
This commit adds the short link 'http://goo.gle/angular-v15' to the project
changelog.

PR Close #50132
2023-05-03 13:05:29 -07:00
Alex Rickabaugh 51fff0b964 build: update aio to 16.0.0 (#50131)
This commit updates the Angular version for AIO and its examples to 16.0.0.

PR Close #50131
2023-05-03 12:56:41 -07:00
mgechev a326609957 docs: update the roadmap to reflect v16 progress (#50016)
PR Close #50016
2023-05-03 12:54:26 -07:00
Alex Rickabaugh 03c9bf2353 release: cut the v16.0.0 release 2023-05-03 09:46:13 -07:00
Matthieu Riegler b381ad7d8a docs(docs-infra): Remove unused annotation template (#50114)
This page is unused since v7.

PR Close #50114
2023-05-03 10:39:50 +02:00
Angular Robot 0fba3ad16a build: update dependency jsdom to v22 (#50103)
See associated pull request for more information.

PR Close #50103
2023-05-03 10:39:11 +02:00
Angular Robot 2832f0b0b8 build: update all non-major dependencies (#50100)
See associated pull request for more information.

PR Close #50100
2023-05-03 10:37:57 +02:00
Angular Robot 796273d0d0 build: update cross-repo angular dependencies (#50105)
See associated pull request for more information.

PR Close #50105
2023-05-02 18:26:46 +02:00
Paul Gschwendtner 37443d8680 test: update payload golden for AIO to reflect reduction in size (#50107)
The `main` bundle fell below the threshold. No actual investigation
was done here because it's a reduction in size, and the AIO size
matches the `AIO-local` size now. This is expected because the latest
RC closely matches the `main` branch (or even is equivalent at this
point).

PR Close #50107
2023-05-02 16:10:50 +02:00
Angular Robot 1f1485120c build: update cross-repo angular dependencies (#50107)
See associated pull request for more information.

PR Close #50107
2023-05-02 16:10:50 +02:00
Matthieu Riegler 8080bf0076 docs: Make links out of @see tags (#50098)
This commit is part of the work for #50097 to improve the linking on the online documentation.

PR Close #50098
2023-05-02 13:14:27 +02:00
Angular Robot c9d4a6965c build: update github/codeql-action action to v2.3.2 (#50102)
See associated pull request for more information.

PR Close #50102
2023-05-02 12:29:04 +02:00
Matthieu Riegler 2f5ac11c69 docs: fix non-relative links. (#50080)
Relative links have 2 advantages :
* They're not marked as external links
* When on a specific doc version, the link point to the same version.

PR Close #50080
2023-05-02 12:27:24 +02:00
Angular Robot bee7c1514b build: update cross-repo angular dependencies (#50069)
See associated pull request for more information.

PR Close #50069
2023-05-02 12:17:34 +02:00
Matthieu Riegler 65f08e3281 docs(docs-infra): hide Debugging the errorsection. (#50074)
On the error template, hide `Debugging the error` when there is none provided in the markdown file.

PR Close #50074
2023-05-02 12:15:03 +02:00
Matthieu Riegler 33a560d0d8 docs(docs-infra): fix the search-results label color on the dark theme. (#50083)
Theme color switching wasn't handled.

PR Close #50083
2023-05-02 12:13:27 +02:00
Andrew Kushnir 3d916c13f9 docs: archiving older changelog entries (#49957)
This commit moves changelog entries before v14.0.0 to the `CHANGELOG_ARCHIVE.md` file to make sure we do not reach Github limit, which would make CHANGELOG.md non-viewable in a browser.

PR Close #49957
2023-05-02 12:10:12 +02:00
mgechev 141b1478fa docs: cleanup team page (#50044)
PR Close #50044
2023-05-02 12:00:18 +02:00
Andrew Scott 9dcce41f70 ci: Update pullapprove availability (#50070)
I will not be available to review PRs for an extended period of time.

PR Close #50070
2023-05-02 11:58:23 +02:00
Lola Bola 5ced888143 docs: fix a typo (#50092)
PR Close #50092
2023-05-02 11:55:18 +02:00
Alex Rickabaugh 6928618fd7 release: cut the v16.0.0-rc.4 release 2023-05-01 10:31:55 -07:00
Mark Thompson 952569c2c6 docs: update the intro page (#49980)
Update the introduction page to include a link to the new tutorial and to remove links to the other tutorials to give learners a clearer path forward. Also, add files to pull approve.

PR Close #49980
2023-05-01 10:02:23 -07:00
Mark Thompson 4f2e70d5ce docs: update broken tests (#49980)
PR Close #49980
2023-05-01 10:02:23 -07:00
Mark Thompson 1293c95456 docs: update linting issues and fix failing tests (#49980)
PR Close #49980
2023-05-01 10:02:23 -07:00
Mark Thompson 8da1f70286 docs: add first-app lesson-14 (#49980)
Adds the content for lesson 14, updates a mistake in lesson 13, and updates the tutorial index page.

PR Close #49980
2023-05-01 10:02:23 -07:00
Mark Thompson 4f07ca6e0f docs: update first-app tutorial lesson 13 (#49980)
Adds the content for lesson 13, fixes some code inconsistencies for the services code in the examples, and adds this lesson to the navigation.

PR Close #49980
2023-05-01 10:02:23 -07:00
Mark Thompson 7ab4803142 docs: update first-app lesson 12 (#49980)
Add content for tutorial lesson 12 and update the code examples.

PR Close #49980
2023-05-01 10:02:23 -07:00
Mark Thompson 2187903a27 docs: update first-app tutorial lesson 11 (#49980)
Add content for lesson 11. Update previous lessons and code examples be in line with the latest lesson formatting.

PR Close #49980
2023-05-01 10:02:23 -07:00
Mark Thompson 71f46d63af docs: update first-app tutorial lesson 10 (#49980)
Updated the content for the tutorial lesson 10, added doc regions to the code and updated the service. Also added a placeholder for lesson 11.

PR Close #49980
2023-05-01 10:02:22 -07:00
Mark Thompson 8fb6416822 docs: update first-app tutorial lesson 09 (#49980)
Updates the content of the lesson and adds a placeholder for the next lesson. Also, updates the code for the example to reflect the patterns from the previous iterations.

PR Close #49980
2023-05-01 10:02:22 -07:00
Mark Thompson 50f7cff73d docs: add first app tutorial lesson 08 (#49980)
Adds lesson 8, some images, fixes a typo and adds the required navigation item

PR Close #49980
2023-05-01 10:02:22 -07:00
Mark Thompson 4621696e4b docs: add first-app lesson 07 (#49980)
Adds the content for lesson 07, a new image, a navigation entry and some updates to the example code for this lesson. Also, this updates previous lessons where typos and copy/pasta errors show up

PR Close #49980
2023-05-01 10:02:22 -07:00
Mark Thompson d5e4f1f16d docs: add first-app-lesson-06 (#49980)
Adds lesson 06 as well as fixes up some code inconsistencies. Adds docregions to some lessons and adds a missed step, misspellings and more to previous lessons.

PR Close #49980
2023-05-01 10:02:22 -07:00
Mark Thompson 0a5df6e0a6 docs: sync assets and styles across lessons (#49980)
Each individual lesson should have the images available in the download since a learner can start from any lesson. So, we're adding images here. Also, sync'ing styles for consistency across the lessons. This is fixing some previous commits that didn't include these changes. The goal is that for future commits we can have less changes and focused solely on that lesson

PR Close #49980
2023-05-01 10:02:22 -07:00
Mark Thompson e6def73f4b docs: update first-app lesson 05 (#49980)
This commit does the following:
- Add the instructional content for lesson 05
- Add an entry to navigation.json for this lesson
- Adds doc regions to the housing-location.component file
- Adds a placeholder for lesson 06 (that way links work now)

PR Close #49980
2023-05-01 10:02:21 -07:00
Mark Thompson 8b9eae7cff docs: add first-app lesson tutorial-04 (#49980)
Update the tutorial for lesson 04 on interfaces. Also added images required for the base app. Created the placeholder for the next lesson so the app works if built from this branch. Updated navigation to include this step in the navigation menu.

PR Close #49980
2023-05-01 10:02:21 -07:00
Mark Thompson 448f3550c8 docs: add first-app lesson tutorial-03 (#49980)
Adds files for the 03 lesson and updated the 02 lesson in some places where the language was incorrect or unclear

PR Close #49980
2023-05-01 10:02:21 -07:00
Mark Thompson 12e5bde006 docs: update first-app lesson-02 (#49980)
Updates the learning content, the snippet regions from the code examples, and adds screenshots for the lesson. Also, add a base page for lesson-03

PR Close #49980
2023-05-01 10:02:21 -07:00
Mark Thompson d2539a6313 docs: update first-app tutorial lesson-01 (#49980)
Update the content to complete the instructions required for users to build the app as described in lesson one. Also, added a new image that represents that app as of completing lesson-01.

PR Close #49980
2023-05-01 10:02:21 -07:00
Mark Thompson bb5d697422 docs: update first-app-tutorial introduction (#49980)
Add application screenshot (and create the directory to host images for this tutorial). Also, update index.md instructions and complete TODOs/missing content.

PR Close #49980
2023-05-01 10:02:21 -07:00
Bob Watson eec7ffbdbe docs: add first-app tutorial lesson-12 (#49980)
PR Close #49980
2023-05-01 10:02:21 -07:00
Bob Watson 2967e1e982 docs: add first-app tutorial lesson-11 (#49980)
PR Close #49980
2023-05-01 10:02:21 -07:00
Bob Watson 1da912d1bc docs: add first-app tutorial lesson-09 (#49980)
PR Close #49980
2023-05-01 10:02:21 -07:00
Bob Watson 14bcde9d76 docs: add first-app tutorial lesson-04 (#49980)
PR Close #49980
2023-05-01 10:02:21 -07:00
Bob Watson f21b510311 docs: add first-app tutorial lesson-02 (#49980)
PR Close #49980
2023-05-01 10:02:20 -07:00
Bob Watson c258e4ab98 docs: add first-app tutorial lesson-01 (#49980)
PR Close #49980
2023-05-01 10:02:20 -07:00
Bob Watson 020877b5be docs: add first-app tutorial lesson-00 (#49980)
PR Close #49980
2023-05-01 10:02:20 -07:00
Charles Lyding d6d347fec5 docs: add developer preview guide for esbuild-based build system (#50068)
Angular v16 will move the esbuild-based browser application builder from
an experimental status to a developer preview status. This newly added
guide provides instructions and information regarding the use of the new
build system.

PR Close #50068
2023-05-01 07:54:17 -07:00
Matthieu Riegler d80a6fce3d docs: Add rxjs-interop and reactivity primitives APIs (#50066)
This commit add the APIs of rxjs-interop and reactivity primitives to the online documentation.

PR Close #50066
2023-05-01 07:53:47 -07:00
Alan Agius 5ea624f313 fix(platform-server): remove dependency on @angular/platform-browser-dynamic (#50064)
Using `@angular/platform-browser-dynamic` is no longer required for JIT scenarios with Ivy. Instead `@angular/compiler` should be imported instead.

This change is part of the effort to reduce the server bundles sizes, which is needed to support cloud workers.

BREAKING CHANGE:
Users that are using SSR with JIT mode will now need to add  `import to @angular/compiler` before bootstrapping the application.

**NOTE:** this does not effect users using the Angular CLI.

PR Close #50064
2023-05-01 07:50:04 -07:00
Matthieu Riegler 5711babbd3 refactor(common): Deprecate useless isPlatform functions (#50055)
The Web worker platform was removed in v11.
`isPlatformWorkerApp` & `isPlatformWorkerUi` have no purpose since.

PR Close #50055
2023-05-01 07:39:40 -07:00
Jeremy Elbourn 16430fbdb8 docs: add v16 update guide (#50073)
PR Close #50073
2023-05-01 07:38:11 -07:00
Dylan Hunn d0c976fc5a docs: Introduce RxJS and Signals interop guide (#50039)
Create a new Signals section on aio, and add an interop guide.

PR Close #50039
2023-05-01 07:36:47 -07:00
Dylan Hunn 67abb3ffea docs: Add DestroyRef and takeUntilDestroyed sections to lifecycle doc (#50042)
These two concepts are a crucial addition to component destruction, and are added to the existing lifecycle doc (which is retitled more generally).

PR Close #50042
2023-05-01 07:34:02 -07:00
Alex Rickabaugh 6dc3add921 docs(core): primary Angular Signals documentation (#50053)
Adds the developer preview signals guide to AIO, under the preview section.
This guide explains signals, computed properties, and effects.

PR Close #50053
2023-04-28 16:36:38 -07:00
Alex Rickabaugh d5fb3ad645 refactor(core): finalize rxjs-interop options & docs (#50071)
This commit introduces an interface for `toSignal` options to mirror that of
`toObservable`, and adjusts docs for both symbols. It also adds the ability
for `toSignal` to manually specify `DestroyRef` (similarly to
`toObservable` accepting an injector) or for `toSignal` automatic cleanup to
be disabled (in which case the subscription persists until the Observable
completes). Either option allows `toSignal` to be used outside of a DI
context, like `toObservable`.

PR Close #50071
2023-04-28 16:08:47 -07:00
Angular Robot cb5c4e0bff build: update cross-repo angular dependencies (#50067)
See associated pull request for more information.

PR Close #50067
2023-04-28 18:19:42 +02:00
Leosvel Pérez Espinosa 65b11ef6f3 refactor(compiler-cli): add back ngcc as a no-op with a warning (#50045)
This commit adds back `ngcc` as a no-op operation. When invoked it will warn providing details about removing `ngcc`.

In Angular 17, this will be removed.

PR Close #50045
2023-04-28 18:18:41 +02:00
Andrew Scott 6da1054a42 fix(compiler-cli): catch fatal diagnostic when getting diagnostics for components (#50046)
This commit adds similar handling to what was done in https://github.com/angular/angular/commit/ed817e32fe0239c0f08ce342c7ad224055d56f84.
The language service calls the `getDiagnosticsForComponent` function
when the file is not a typescript file.

fixes https://github.com/angular/vscode-ng-language-service/issues/1881

PR Close #50046
2023-04-28 15:18:05 +02:00
Angular Robot 4a5d4a9253 build: update cross-repo angular dependencies (#49978)
See associated pull request for more information.

PR Close #49978
2023-04-28 13:36:18 +02:00
Paul Gschwendtner d59a3c4bbd ci: update link to start google presubmit (#50060)
Updates the golink to start a google presubmit, given that
documentation has moved.

PR Close #50060
2023-04-28 11:41:23 +02:00
Matthias Kunnen 80ed0a4868 fix(common): fix incorrectly reported distortion for padded images (#49889)
The original code uses clientWidth and clientHeight which returns the
width and height of the element including the padding. This results in
the aspect ratio being determined incorrectly and the image distortion
warning triggering. The new code uses getComputedStyle which returns
the width and height without padding.

Another advantage of using getComputedStyle is that, unlike clientWidth
and clientHeight, the number returned is a decimal which provides
greater accuracy. This could allow for lowering the ASPECT_RATIO_TOLERANCE.

PR Close #49889
2023-04-27 17:16:48 +02:00
Matthias Kunnen 9bca3fbb23 test(common): test rounding problems in image distortion detection (#49889)
Due to assertNoImageDistortion using clientWidth and clientHeight, and these properties returning integers, rounding errors occur that exceed the aspect ratio tolerance.
Increasing the tolerance could hide actual distortion so correcting the calculation to use floats would be best and could even allow for a lower tolerance.

PR Close #49889
2023-04-27 17:16:48 +02:00
Matthias Kunnen 7baa156b75 test(common): show ngOptimizedImage distortion detection failure on padded images (#49889)
The image distortion detection performed uses clientWidth/clientHeight which includes the padding.
This leads to images with padding being detected as distorted while they are not and distortion being masked by padding.

PR Close #49889
2023-04-27 17:16:48 +02:00
Dylan Hunn 3feb9aea2e release: cut the v16.0.0-rc.3 release 2023-04-27 00:27:24 -07:00
Andrew Scott e7ed4ab125 refactor(core): separate render and change detection instructions (#50017)
Both the render and update instructions live in the same file and are
only separated via a "render*" vs "refresh*" naming convention. This
commit moves these functions to completely separate files.

PR Close #50017
2023-04-26 23:49:07 -07:00
Angular Robot 0e8fef9a70 build: update all non-major dependencies (#49990)
See associated pull request for more information.

PR Close #49990
2023-04-26 13:13:30 -07:00
Angular Robot 93b7261ef1 build: update eslint dependencies to v5.59.1 (#49991)
See associated pull request for more information.

PR Close #49991
2023-04-26 13:12:48 -07:00
Angular Robot 72ce27115d docs: update Angular CLI help [16.0.x] (#50031)
Updated Angular CLI help contents.

PR Close #50031
2023-04-26 12:40:48 -07:00
Angular Robot c183d65db4 build: update io_bazel_rules_sass digest to 236d2fc (#50006)
See associated pull request for more information.

PR Close #50006
2023-04-26 12:40:16 -07:00
Andrew Scott 2505018eaa refactor(core): Rename 'transplanted' view refresh flag and counters to be generic (#50000)
It's likely that the flag and counters used to track transplanted views
needing a refresh will be reused to signal views as well. The two follow
a similar rule: While the parents might not be "Dirty", there is still a
child/descendant view somewhere that needs to be refreshed during change
detection.

PR Close #50000
2023-04-26 11:29:49 -07:00
Angular Robot b6189cd055 build: update dependency patch-package to v7 (#50002)
See associated pull request for more information.

PR Close #50002
2023-04-26 11:29:14 -07:00
Angular Robot 2b284763fe build: update github/codeql-action action to v2.3.0 (#49992)
See associated pull request for more information.

PR Close #49992
2023-04-26 11:28:12 -07:00
Alan Agius cc099e7aa0 fix(docs-infra): add work-break to a tags in .cli-option (#50012)
This commit fixes a styling issue were the default values are not being displayed in https://angular.io/cli/build which is because in some cases the option description has a long anchor tag which causes the content to be pushed to the right and gets hidden.

PR Close #50012
2023-04-26 09:25:00 -07:00
Andrew Kushnir b88421bfc5 refactor(platform-server): avoid using platformDynamicServer when ngJitMode is disabled (#50007)
This commit refactors the logic of the `platform-server` to avoid using `platformDynamicServer` when `ngJitMode` is disabled. This is needed to avoid including JIT compiler into the source code of the server bundle, when this compil
er is not needed.

PR Close #50007
2023-04-26 09:23:52 -07:00
Alan Agius 74c925c19c fix(platform-browser): export deprecated TransferState as type (#50015)
Prior to this commit `TransferState` re-export could not be used as a type.

Closes #50014

PR Close #50015
2023-04-26 09:21:08 -07:00
Matthieu Riegler a15294009f refactor(core): Error code for Component Id collision (#49986)
The commit add an error code for the Component Id collision and documentation page to fix the issue.

PR Close #49986
2023-04-26 09:19:58 -07:00
Alan Agius 9aff146dad docs: update universal guide to include standalone methods (#49993)
This commit updates the universal guide to include standalone methods.

PR Close #49993
2023-04-26 09:18:36 -07:00
Alan Agius bb5c6bf869 docs: update ssr example files (#49993)
`app.server.module` was renamed to `app.module.server`. See: https://github.com/angular/angular-cli/pull/25058

PR Close #49993
2023-04-26 09:18:36 -07:00
Alan Agius 4fabe4c294 docs: update file structure to include standalone application files (#49993)
This commit updates the docs to include standalone files.

PR Close #49993
2023-04-26 09:18:36 -07:00
Alan Agius c0d698ec5b docs: update links to reference the version compatibility guide (#49995)
This commit updates several docs to reference the version compatibility guide instead of the `package.json`.

PR Close #49995
2023-04-26 09:17:57 -07:00
Andrew Scott d26d4103f8 refactor(core): Use bit shift operator instead of manually writing numbers (#49987)
The LViewFlags are using manually written 0bxxxxx numbers which can be very hard to read
once there are more than a handful of 0s and 1s. The bit shifting feels a lot more
legible.

PR Close #49987
2023-04-25 17:23:29 -07:00
Matthieu Riegler 9e0a651a5a build(elements): remove unecessary filegroup. (#49982)
This is uneccessary now. All supported browsers support custom elements.

PR Close #49982
2023-04-25 09:30:59 -07:00
Matthieu Riegler 8b0f13eadd refactor(docs-infra): remove semi rule from eslintrc. (#49970)
The `semi` rule a duplicate since `plugin:@angular-eslint/ng-cli-compat--formatting-add-on` already includes `@typescript-eslint/semi` as error.

PR Close #49970
2023-04-25 09:30:16 -07:00
Jessica Janiuk 4240f4a35a refactor(core): improve error message when dom node is not found (#49977)
This adds context to the error message in the case that a DOM node is not found during the hydration process. It outputs the expected DOM structure based on the lView and tNode rather than an unhelpful text message.

PR Close #49977
2023-04-25 09:29:47 -07:00
Matthieu Riegler 58975d9754 build: bump license year (#49984)
Bumping to 2023

Fixes #49983

PR Close #49984
2023-04-25 09:29:19 -07:00
Alan Agius 7cdf710092 docs: add v16 in version compatibility table (#49994)
This commit add version v16 in the version compatibility table.

PR Close #49994
2023-04-25 09:28:45 -07:00
Andrew Scott 5cdf6bc089 refactor(core): Synchronously emit the current signal value in toObservable (#49894)
As described in
https://github.com/angular/angular/discussions/49681#discussioncomment-5628930,
if an `Observable` created from a signal with `toObservable` is
subscribed to in a template, it will initially have `null` as the value.
Immediately after the template is done executing, effects are flushed
and this results in the `AsyncPipe` getting a new value before the
`checkNoChanges` pass, resulting in `ExpressionChanged` error.

```
template: '{{obs$ | async}}'
...
obs$ = toObservable(signal(0));
```

Instead, this commit updates the `toObservable` to synchronously emit
the initial value to the Observable stream.

Side note here: We don't exactly encourage this pattern. Instead of
using `AsyncPipe`, the template should just read signals.

PR Close #49894
2023-04-25 09:27:38 -07:00
Matthieu Riegler b4531f1d82 fix(core): typing of TestBed Common token. (#49997)
Both `ComponentFixtureAutoDetect`  and `ComponentFixtureNoNgZone` are mistyped. Tokens are only instantiated with booleans.

PR Close #49997
2023-04-25 09:27:08 -07:00
Alan Agius 022ed5adb0 test: remove unused size goldens (#49976)
These test has been deleted as such the size check golden here is redundant.
PR Close #49976
2023-04-24 11:56:37 -07:00
Matthieu Riegler fed4c28de0 refactor(core): call publishSignalConfiguration when bootstraping a standalone component. (#49968)
`publishSignalConfiguration` was not called when bootstraping an app using `boostrapApplication()`

PR Close #49968
2023-04-24 11:54:05 -07:00
Angular Robot e3ee11f1e7 build: update cross-repo angular dependencies (#49964)
See associated pull request for more information.

PR Close #49964
2023-04-24 11:53:26 -07:00
Lars Gyrup Brink Nielsen b5da47be0f docs(core): correct description of actively supported versions (#49945)
PR Close #49945
2023-04-24 11:52:20 -07:00
Lars Gyrup Brink Nielsen 08dd9d5196 docs(core): combine compatibility for minor versions sharing dependencies (#49945)
PR Close #49945
2023-04-24 11:52:20 -07:00
Matthieu Riegler b882fdbba5 refactor(compiler-cli): remove unecessary type assertion (#49971)
microsoft/TypeScript#43966 was fixed in 4.3.1

PR Close #49971
2023-04-24 11:51:18 -07:00
Qiuran Hu e17267f08f docs: fix typo in lazy-loading feature modules doc (#49972)
PR Close #49972
2023-04-24 10:52:46 -07:00
Jessica Janiuk 9172e63973 test(core): Add hydration symbols test (#49955)
Add symbols tracking test for hydration.

PR Close #49955
2023-04-24 09:57:52 -07:00
Jessica Janiuk 2ccfebd774 test(core): add size tracking test for hydration apps (#49955)
This adds test to track size regressions when
hydration is enabled.

PR Close #49955
2023-04-24 09:57:52 -07:00
Alan Agius de240e37f3 ci: do not install Java in the test execturor (#49975)
Java is now only needed for `test_zonejs` as all closure related tests have been removed from the framework.

PR Close #49975
2023-04-24 09:57:24 -07:00
Alan Agius 5fe2adec98 docs: remove no longer available tests from readme (#49975)
This commit removes no longer available integration tests from the readme.

PR Close #49975
2023-04-24 09:57:24 -07:00
Alan Agius 96529fa9ff build: update integration test node_modules (#49975)
This commit updates the tests node_modules to be ignored.

PR Close #49975
2023-04-24 09:57:23 -07:00
Jessica Janiuk 6d7be42da7 fix(core): add newline to hydration mismatch error (#49965)
This adds a newline after the hydration mismatch errors to provide more separation and readability.

PR Close #49965
2023-04-24 09:52:45 -07:00
Rushikesh Kavar bc9d0b71c6 docs: applicability of NgModule providers (#49966)
saying that providers of this NgModule is available to components,pipes and directive of "this" ngModule is not accurate sentence to describe the fact.
I am referring from: https://angular.io/guide/hierarchical-dependency-injection.
It says that "ModuleInjector is configured by the @NgModule.providers and NgModule.imports property. ModuleInjector is a flattening of all the providers arrays that can be reached by following the NgModule.imports recursively."
So, any component,pipe or directive of other NgModule within same ModuleInjector can use providers of this NgModule.
PR Close #49966
2023-04-24 09:51:58 -07:00
Matthieu Riegler da681ee712 refactor(core): throw an error when APP_INITIALIZER token is not an array. (#49860)
Providing a non-multi token for `APP_INITIALIZER` now throws `INVALID_MULTI_PROVIDER` (NG209)

PR Close #49860
2023-04-23 18:31:24 -07:00
Andrew Kushnir a2b6b9d584 refactor(platform-browser): log a warning when a custom or a noop ZoneJS is used with hydration (#49944)
Hydration relies on a signal from ZoneJS when it becomes stable inside an application, so that Angular can start serialization process on the server or post-hydration cleanup on the client (to remove DOM nodes that remained unclaimed).

Providing a custom or a "noop" ZoneJS implementation may lead to a different timing of the "stable" event, thus triggering the serialization or the cleanup too early or too late. This is not yet a fully supported configuration.

This commit adds a warning (non-blocking) for those cases.

PR Close #49944
2023-04-23 18:23:29 -07:00
Matthieu Riegler 917548cef4 docs: remove the warning about shadowDom support (#49961)
ShadowDom support is now ubiquitous since 2020 and all evergreen browsers.

PR Close #49961
2023-04-23 18:22:47 -07:00
Matthieu Riegler 8d32acf8d0 docs: remove mention of the webworker platform issues (#49947)
The Webworker platform was remove in v10, we can remove this part.

Fixes #49934

PR Close #49947
2023-04-23 18:21:00 -07:00
Payam Valadkhan 4ee06b1a29 refactor(compiler-cli): Add experimental local compilation mode. (#49846)
In this mode the compiler generates code based on each individual source file without using its dependencies. This mode is suitable only for fast edit/refresh during development.

PR Close #49846
2023-04-23 18:19:35 -07:00
Angular Robot 0ade007119 build: update cross-repo angular dependencies (#49956)
See associated pull request for more information.

PR Close #49956
2023-04-21 09:06:25 -07:00
Angular Robot 2948a022e5 build: update cross-repo angular dependencies to v16.0.0-rc.2 (#49941)
See associated pull request for more information.

PR Close #49941
2023-04-20 14:51:02 -07:00
Andrew Kushnir 60fe29ec13 refactor(core): hydrate components of the same type used with and without ngSkipHydration (#49943)
This commit updates hydration logic to hanlde a case when the same component is used multiple times in a template and in some of those cases, component is opted-out of hydration, for example:

```
<cmp ngSkipHydration />
<cmp />
```

Previously, the first occurrence of the `<cmp>` would result in storing the `ssrId` on a TView as `null` (since hydration is disabled for the component) and the second component instance reused the `null` as a value, thus also skipping hydration.

With the changes from this commit, the `ssrId` would be set when we come across a hydratable instance. We also make sure that the `ssrId` value never changes after we first set it to a non-`null` value.

PR Close #49943
2023-04-20 14:50:33 -07:00
lonikadze ca74af8b82 docs: replaces "comp: docs" label to "area: docs" (#49952)
Fixes #49951

PR Close #49952
2023-04-20 14:50:03 -07:00
skrtheboss 9180f98f0e fix(core): ensure takeUntilDestroyed unregisters onDestroy listener on unsubscribe (#49901)
The takeUntilDestroyed must always remove the onDestroy listener,
in the teardown logic.

PR Close #49901
2023-04-19 19:55:09 +00:00
Jessica Janiuk 2f4b61e164 release: cut the v16.0.0-rc.2 release 2023-04-19 12:37:03 -07:00
lonikadze d45aafb264 docs: add information on how to use index option in configuration (#49813)
#49780

PR Close #49813
2023-04-19 18:46:11 +00:00
Pawel Kozlowski f8b95b9da6 fix(core): execute query setters in non-reactive context (#49906)
This commit assures that query results setters run when there is no active
reactive consumer set.

PR Close #49906
2023-04-19 18:12:15 +00:00
Pawel Kozlowski 2650f1afc1 fix(core): execute input setters in non-reactive context (#49906)
This change explicitly resets a reactive consumer before setting inputs
on directive instances. This is to assure that any potential input setters
do _not_ run in the reactive context.

PR Close #49906
2023-04-19 18:12:15 +00:00
judytag b7d6889bf1 docs: update-to-version-14 linting fixes (#49839)
PR Close #49839
2023-04-19 18:10:33 +00:00
Kristiyan Kostadinov a3c3ab757c fix(core): handle invalid classes in class array bindings (#49924)
When binding an array to `class` like `[class]="['foo', 'bar']"`, the runtime treats it the same as a literal binding with all the values being `true`, e.g. `{foo: true, bar: true}`. While object literals can only have string keys, arrays can have any value which can lead to errors if the array contains non-string values.

These changes add some logic to stringify the keys and ignore invalid ones.

Fixes #48473.

PR Close #49924
2023-04-19 16:28:27 +00:00
Matthieu Riegler 69fb7b0761 docs: schematics for functional guards & resolvers (#49865)
Adding back the schematics to generate functional guards & resolver that they are supported.

PR Close #49865
2023-04-19 16:22:53 +00:00
Matthieu Riegler c9a1044b04 refactor(core): Create TestBed injector without a module (#49864)
We can create the injector without relying on th module factory.

PR Close #49864
2023-04-19 15:30:23 +00:00
Alan Agius a175ac5441 test: update platform-server tests to test both ngmodule and standalone application (#49927)
This commits update the platform-server test structure to add 2 applications in the Angular CLI workspace one based on ngmodules and another standalone. The same E2E suit is ran on both apps.

PR Close #49927
2023-04-19 14:56:29 +00:00
Andrew Kushnir 21b834fc36 test(core): adding extra tests for hydration of view containers located after <ng-content> slots (#49920)
This commit adds extra tests to verify a couple additional use-cases related to view containers located after <ng-content> slots.

PR Close #49920
2023-04-19 14:26:43 +00:00
Andrew Kushnir aa240382bd refactor(core): handle empty projection slots within <ng-container> during hydration (#49920)
This commit updates hydration logic to handle cases when there are projection slots present in a template inside of an `<ng-container>` and when there are regular elements follow an <ng-content> slot (see tests for additional information). With this combination, the logic that annotates regular element locations should fallback to calculating a path from a reference node to that node. In case of an <ng-container>, the comment node is located *after* the node that needs an annotation. An existing logic was mistakenly returning an empty path, which was represented as a pointer to teh reference node. This commit fixes that and triggers a fallback to using a component host node as a reference in this case.

Resolves #49918.

PR Close #49920
2023-04-19 14:26:43 +00:00
Alan Agius 48ab536b94 refactor(core): remove redundant hydrationInfo check (#49926)
This check is not needed as it is done in the previous line

PR Close #49926
2023-04-19 14:21:40 +00:00
Alan Agius 38e8d4b3b8 docs: some changes to the helpful not in preserve-whitespaces (#49928)
This commit updates the note with a recommendation.

PR Close #49928
2023-04-19 14:18:43 +00:00
Alan Agius e036c914e7 docs: fix grammer in preserve whitespaces notes (#49928)
This commit fixes some grammer in preserve whitespaces notes.

PR Close #49928
2023-04-19 14:18:43 +00:00
Lars Gyrup Brink Nielsen a803bb5df3 docs(core): add version ranges for Angular 14.3 (#48753)
PR Close #48753
2023-04-19 14:07:32 +00:00
Lars Gyrup Brink Nielsen d940ff482a docs: change section heading (#48753)
Co-authored-by: Daniel Scalzi <d_scalzi@yahoo.com>
PR Close #48753
2023-04-19 14:07:32 +00:00
Lars Gyrup Brink Nielsen 3bee32db86 docs(core): add version ranges for Angular 15.2 (#48753)
PR Close #48753
2023-04-19 14:07:32 +00:00
Lars Gyrup Brink Nielsen 17d856aae1 docs(core): split versions table into LTS and non-LTS tables (#48753)
PR Close #48753
2023-04-19 14:07:32 +00:00
Lars Gyrup Brink Nielsen d680b8eb09 docs(docs-infra): add versions document to code owners (#48753)
PR Close #48753
2023-04-19 14:07:32 +00:00
Lars Gyrup Brink Nielsen 1ec84fbb3f docs(docs-infra): add versions document to the navigation (#48753)
PR Close #48753
2023-04-19 14:07:32 +00:00
Lars Gyrup Brink Nielsen 351d257097 docs(core): include introductory text about version compatibility (#48753)
PR Close #48753
2023-04-19 14:07:32 +00:00
Lars Gyrup Brink Nielsen ab4e2c3176 docs(core): add Angular, Node.js, TypeScript, and RxJS version compatibility matrix (#48753)
PR Close #48753
2023-04-19 14:07:31 +00:00
Angular Robot 50720e41a8 docs: update events (#49569)
Generated `events.json` with the latest events retrieved from the Firebase DB.

Closes #49545

PR Close #49569
2023-04-19 14:05:45 +00:00
Angular Robot 318e3ed402 build: update angular/dev-infra digest to 1564c4e (#49916)
See associated pull request for more information.

PR Close #49916
2023-04-18 22:09:40 +00:00
arturovt 1b13f18779 docs: add Artur Androsovych to GDE resources (#48520)
PR Close #48520
2023-04-18 21:35:46 +00:00
Joey Perrott 209364d2c3 ci: update renovate.json (#49909)
Update renovate to ignore rules_pkg bazel dep and group the babel @types packages with the babel packages themselves.

PR Close #49909
2023-04-18 20:54:28 +00:00
Angular Robot 3fc96ddd63 build: update all non-major dependencies (#49909)
See associated pull request for more information.

PR Close #49909
2023-04-18 20:54:28 +00:00
Angular Robot de0d0b4757 build: update dependency build_bazel_rules_nodejs to v5.8.2 (#49910)
See associated pull request for more information.

PR Close #49910
2023-04-18 20:45:25 +00:00
Alan Agius ded7ede1d4 test: update platform-server integration tests to use the Angular CLI (#49900)
This commit updates the platform-server integration tests to use the Angular CLI as it makes it easier to add more tests and remove the custom webpack setup.

PR Close #49900
2023-04-18 19:47:03 +00:00
Angular Robot ec983fd663 build: update actions/cache digest to 88522ab (#49437)
See associated pull request for more information.

PR Close #49437
2023-04-18 19:46:17 +00:00
Angular Robot 5e4797cd16 build: update dependency google-closure-compiler to v20230411 (#49892)
See associated pull request for more information.

PR Close #49892
2023-04-18 19:07:14 +00:00
Angular Robot b046ecf2a5 build: update cross-repo angular dependencies (#49891)
See associated pull request for more information.

PR Close #49891
2023-04-18 19:06:46 +00:00
Jessica Janiuk 1190c75728 docs: Update hydration guide constraints section (#49908)
PR Close #49908
2023-04-18 19:05:24 +00:00
Jessica Janiuk fc81abd12c docs: add info on preserveWhitespaces to hydration guide (#49904)
PR Close #49904
2023-04-18 19:04:56 +00:00
Andrew Kushnir 44243f8d50 refactor(core): insert special marker only when text node content is an empty string (#49877)
Empty text nodes are not present in the server-rendered HTML output, thus we inject a special marker
at a text node location to later restore an empty text node at the client. Currently, we treat text nodes with spaces as "empty" as well, however those spaces are present in the HTML and text nodes are created in a browser. Adding extra annotation in this case results in extra text nodes created on the client and may trigger hydration issues. This commit updates the code to avoid treating text nodes with spaces as "empty".

PR Close #49877
2023-04-18 19:04:28 +00:00
Douglas Diniz Carvalho 7e286c5d2b docs: type clearTimer function as VoidFunction or undefined (#48480)
PR Close #48480
2023-04-18 19:03:58 +00:00
Douglas Diniz Carvalho 3d07ec1f89 docs: standardize examples using timers for SSR compatibility (#48480)
PR Close #48480
2023-04-18 19:03:58 +00:00
Alex Rickabaugh ead10aff41 refactor(compiler): next context merging in the template pipeline (#49797)
This commit adds a phase to the template pipeline to merge `nextContext()`
instructions that follow each other without context reads in between. That
is, the sequence:

```typescript
nextContext();
var v1 = nextContext();
```

becomes:

```typescript
var v1 = nextContext(2);
```

PR Close #49797
2023-04-18 17:00:52 +00:00
Alex Rickabaugh 84af3e302d refactor(compiler): convert literals and this in template pipeline (#49797)
This commit adds support for two new expression AST forms to the template
pipeline ingest step: literal values and `this`.

PR Close #49797
2023-04-18 17:00:52 +00:00
Alex Rickabaugh 9a37b3ed6a refactor(compiler): emit correct listener name in template pipeline (#49797)
This commit modifies the `ListenerOp` operation to capture the context
needed to generate the "correct" (per `TemplateDefinitionBuilder`) function
name for the handler function for the listener.

PR Close #49797
2023-04-18 17:00:52 +00:00
Alex Rickabaugh 59bed917d9 refactor(compiler): fix wrong instruction emit for resetView (#49797)
The `resetView` instruction in the template pipeline had a copy-paste error
where it was emitting a call to `reference` instead. This commit fixes the
issue.

PR Close #49797
2023-04-18 17:00:52 +00:00
Alex Rickabaugh c4fe1e329e refactor(compiler): implement operation chaining in the template pipeline (#49797)
This commit adds a chaining phase which post-processes reified template
pipeline operations, and collapses chainable instructions into chained
calls. Performing chaining as a post-processing step after reification
allows the specifically selected instruction variants to be known when
considering chaining two operations.

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh 303ad05b9c refactor(compiler): variable optimizer for the template pipeline (#49797)
This commit adds a variable optimization pass to the template pipeline. The
pipeline generates all variables which might be referenced within a given
view's template function, regardless of whether other operations will read
those values.

The variable optimizer post-processes the IR and performs several variable-
related optimizations:

* It transforms variable declarations to side effectful expressions when the
  variable is not used, but its initializer has global effects which other
  operations rely upon.
* It removes variable declarations if those variables are not referenced and
  either they do not have global effects, or nothing relies on them.
* It inlines variable declarations when those variables are only used once
  and the inlining is semantically safe.

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh cbda8054c5 refactor(compiler): handle textInterpolate with empty string bookends (#49797)
This commit teaches the template pipeline how to generate `textInterpolate`
when there's a single expression with no surrounding static text.

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh f5f67e6917 refactor(compiler): reorder constant pool statements in template pipeline (#49797)
This commit reverses the generate template functions when adding them to the
constant pool in the template pipeline. This seems to better match the
ordering in which `TemplateDefinitionBuilder` generates template functions.
Further study is needed to determine if this is exactly accurate.

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh d5c40a569b refactor(compiler): skip emit of empty blocks in template pipeline (#49797)
This commit configures the template pipeline to skip the emit of empty
create or update blocks of a template function.

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh 4688464ac5 refactor(compiler): fix issues with advance() in the template pipeline (#49797)
`advance()` was not emitted correctly by the template pipeline. There were
two problems:

* it was not handled in `transformExpressionsInOp()`.
* it was not added to the list correctly in `phaseGenerateAdvance()`.

This commit addresses both problems.

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh 3d2fc821e8 refactor(compiler): fix node ownership assertions in template pipeline ops (#49797)
This commit fixes a broken assertion in the template pipeline concerning the
ownership of nodes in `insertBefore`, as well as adjusts a few other
assertions.

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh 3fa916047d refactor(compiler): don't throw on static attr bindings in the pipeline (#49797)
The template pipeline previously included an error when a static attribute
binding was found on an `<ng-template>`, under the assumption that this case
didn't happen in reality. It turns out that it does, so this commit removes
the error in favor of a comment to investigate the case further.

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh a2245663b0 refactor(compiler): reify the correct parameters to template() (#49797)
The template pipeline previously reified the parameters to `template()`
incorrectly. This commit adjusts the output to correctly reference the
attributes of the `template()` call.

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh bc20ca4913 refactor(compiler): introduce ir.VisitorContextFlag to template pipeline (#49797)
This commit introduces a flag which is tracked while visiting expression
nodes in the template pipeline. This flag can be used to differentiate when
in an immediate evaluation context vs. a closure, which is useful for
certain operations.

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh d09b23c8ad refactor(compiler): generate correct fn names in the template pipeline (#49797)
The `TemplateDefinitionBuilder` has a specific pattern it uses for template
function names for embedded view template functions. This commit changes the
template pipeline to use the same format, allowing the generated code to
match between them.

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh ea8a264b83 refactor(compiler): rethink ir.SemanticVariables and their naming (#49797)
The `TemplateDefinitionBuilder` uses the same name for the same semantic
variables across different views declared in a component. This commit
refactors the template pipeline's concept of `ir.SemanticVariable` to share
instances across all `ViewCompilation`s. This allows the `name` of the
variable to be stored on the `ir.SemanticVariable` instance instead of on
the `ir.VariableOp` (which makes sense as variables are often named based on
the `ir.SemanticVariable` anyway).

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh 2bf6d45cbe refactor(compiler): read context of the correct view for let- variables (#49797)
The template pipeline was previously reading the context of the wrong view,
resulting in incorrect generated code. Previously only `ctx` was being used,
since the context read was always that of the current view being compiled,
even for variables which exist on the contexts of parent views.

PR Close #49797
2023-04-18 17:00:51 +00:00
Alex Rickabaugh dd3908c24d refactor(compiler): reorder fields for template pipeline output (#49797)
The template pipeline was emitting fields on the component definition in a
different order than the `TemplateDefinitionBuilder`, which causes test
failures. Additionally, the `consts` field was being emitted even if it was
empty.

PR Close #49797
2023-04-18 17:00:51 +00:00
CodeMaster7000 c34e945cdb docs: update README.md (#48423)
PR Close #48423
2023-04-18 16:59:39 +00:00
Vasil Chimev ffb8715f86 docs: typos and wording (#48597)
PR Close #48597
2023-04-18 16:58:32 +00:00
Matthieu Riegler 27c624e8e7 refactor(compiler): handle #24571 todos. (#49220)
This commit removes the remaining TODO(issue/24571) in compiler code base.

PR Close #49220
2023-04-18 16:30:44 +00:00
Vladyslav Makarenko f05d4b9b84 docs: add a dot (#49434)
The first sentence misses a dot in the end, however other sentences have it
PR Close #49434
2023-04-18 16:22:51 +00:00
Ikko Eltociear Ashimine 82de3fd301 refactor: fix typo in windows-chromium-path.js (#49676)
preceeding -> preceding
PR Close #49676
2023-04-18 16:22:10 +00:00
John Manners 755678123f docs: fix errors in toh-pt6.md (#49129)
Line 182 and line 185 - grammatical and typo errors.
PR Close #49129
2023-04-18 16:21:36 +00:00
Angular Robot 52d2ec1c2e build: update io_bazel_rules_sass digest to 898e4dd (#49575)
See associated pull request for more information.

PR Close #49575
2023-04-18 16:20:54 +00:00
Matthieu Riegler 8219857821 refactor(platform-browser): cleanup references to dart (#49858)
The repo doesn't support dart anymore, we can reduce the references to it .

PR Close #49858
2023-04-18 14:00:45 +00:00
Matthieu Riegler 934d74ba73 refactor(core): cleanup references to dart (#49858)
The repo doesn't support dart anymore, we can reduce the references to it .

PR Close #49858
2023-04-18 14:00:45 +00:00
Matthieu Riegler 7498163ed2 refactor(compiler): cleanup references to dart (#49858)
The repo doesn't support dart anymore, we can reduce the references to it .

PR Close #49858
2023-04-18 14:00:45 +00:00
Matthieu Riegler 3a6e71e5ed refactor(core): Remove ununsed Zone mock from testing internals. (#49873)
The last time it was used in was on the v10 branch.

PR Close #49873
2023-04-18 14:00:16 +00:00
Pawel Kozlowski ef91a2e0fe fix(core): execute template creation in non-reactive context (#49883)
This fix assures that templates functions executed in the creation mode
are run outside of the reactive context. This avoids the situation where
signal reads in a directive constructor (executed as part of the creation
mode) would mark the host component as dirty.

Fixes #49871

PR Close #49883
2023-04-18 13:59:42 +00:00
Angular Robot c985ed2cf7 build: update scorecard action dependencies (#49897)
See associated pull request for more information.

PR Close #49897
2023-04-18 13:58:54 +00:00
Andrew Kushnir 164e50d43d docs: include a note on blocking initial navigation when destructive hydration is used (#49895)
This commit updates the docs for the `withNoDomReuse` function, which lets to opt out of non-destructive hydration.
The docs now mention the need to configure an initial navigation option for the Router to be blocking, i.e.
use `withEnabledBlockingInitialNavigation()` Router feature.

PR Close #49895
2023-04-18 13:56:06 +00:00
Jessica Janiuk 003e7d1c80 Revert "refactor(core): throw an error when APP_INITIALIZER token is not an array. (#49860)" (#49893)
This reverts commit bf2e11c035.

PR Close #49893
2023-04-17 18:57:47 +00:00
Kristiyan Kostadinov 4ee286b518 build: update PullApprove config (#49878)
Updates the PullApprove config to add myself to `fw-compiler` and `fw-core` with the following reasoning:
* We talked about `fw-compiler` some time ago, because it would help with TypeScript updates and because I'm familiar with the compiler.
* Also adding myself to `fw-core` to make it easier with some upcoming features and because I can help with the review load for the runtime changes.

PR Close #49878
2023-04-17 18:32:15 +00:00
Lara Newsom 57b30c9ad9 docs(docs-infra): add lara newsom to GDE resources (#49620)
PR Close #49620
2023-04-17 18:31:15 +00:00
Andrew Scott 2118ee9a38 refactor(router): remove targetPageId from transition (#49799)
The `targetPageId` was pre-calculated at the start of a navigation using
the same logic that exists in `setBrowserUrl` now. Doing the calculation
ahead of time is not necessary and complicates the transition state.

PR Close #49799
2023-04-17 17:36:02 +00:00
Matthieu Riegler 9e6c7d590c refactor(compiler): Remove unnecessary assertion in jit_compiler_facade. (#49852)
This commit removes unnecessary types assertions.

PR Close #49852
2023-04-17 17:35:28 +00:00
Andrew Scott fd9dcd36cd fix(core): Ensure effects can be created when Zone is not defined (#49890)
Effects should run in the same zone they were created in. However, if ZoneJS is not used at all,
effects should just run (without zone). This is similar to what's done
in the elements `ComponentNgElementStrategy`.

fixes #49798

PR Close #49890
2023-04-17 17:34:58 +00:00
Matthieu Riegler cb1ca930fd docs: Specify when an app is debuggable by the DevTools. (#48970)
DevMode is when the ng debug object is available. `Optimization:true` is responsible for treeshaking everything behind `ngDevMode`.

Fixes #48968

PR Close #48970
2023-04-17 17:32:42 +00:00
Matthieu Riegler 204857263b fix(devtools): Specify when an app is considered in dev mode. (#48970)
DevMode is when the ng debug object is available. `Optimization:true` is responsible for treeshaking everything behind `ngDevMode`.

PR Close #48970
2023-04-17 17:32:42 +00:00
Matthieu Riegler 3d7f1d1218 refactor(compiler-cli): cleanup inferences (#49863)
With the ts compiler updates these inferences have been fixed.

PR Close #49863
2023-04-17 17:23:30 +00:00
Angular Robot a4c768cad6 build: update dependency eslint-plugin-jsdoc to v41 (#49885)
See associated pull request for more information.

PR Close #49885
2023-04-17 15:48:24 +00:00
Angular Robot 22a9aab547 build: update cross-repo angular dependencies (#49887)
See associated pull request for more information.

PR Close #49887
2023-04-17 15:46:40 +00:00
Matthieu Riegler 28c789bb06 refactor(compiler-cli): remove unused integration tests. (#49862)
Theses tests have been disabled when the ViewEngine code has been remove in v13.1

PR Close #49862
2023-04-17 14:57:03 +00:00
Matthieu Riegler f04c693f5e refactor(compiler-cli): remove incrementalDriver on the compiler (#49869)
The CLI now only uses the `incrementalDriver` property.

PR Close #49869
2023-04-17 14:54:53 +00:00
Alex Rickabaugh 49fe974501 perf(compiler-cli): optimize NgModule emit for standalone components (#49837)
NgModules which import standalone components currently list those components
in their injector definitions, because we assume that any standalone
component may export providers from its own imports.

This commit adds an optimization for that emit, which attempts to statically
analyze the NgModule imports and determine which standalone components, if
any are present, do not export providers and thus can be omitted.

This analysis is imperfect, because some imported components may be declared
outside of the current compilation, or transitively import types which are
declared outside the compilation. These types are therefore _assumed_ to
carry providers and so the optimization isn't applied to them.

PR Close #49837
2023-04-17 14:51:58 +00:00
Andrew Scott 6a09cc1c4f refactor(router): Do not access browserPageId if not computed resolution (#49850)
This commit avoids accessing the routerPageId if the
canceldNavigationResolution is not computed.

PR Close #49850
2023-04-17 14:47:17 +00:00
Alan Agius 14d27475f8 test: refactor platform-server tests to use async/await (#49855)
This commit changes the platform-server integration tests to use async/await instead of waitForAsync.

PR Close #49855
2023-04-17 14:07:34 +00:00
Matthieu Riegler e668a05929 refactor(common): Remove check for createShadowRoot (#49756)
`createShadowRoot` is not used since the drop of `ViewEncapsulation.Native` in v11 by #38882

PR Close #49756
2023-04-17 14:06:02 +00:00
Matthieu Riegler f254499d0b refactor(docs-infra): cleanup deprecated code (#49671)
This commit replaces (non material-related) deprecated code present in the aio app.

* `pageYOffset` can be replaced by `scrollY`
*  RxJs' `mapTo()` is just a `map()`
* `createNgModuleRef` can be replaced by `createNgModule`
* HttpEmits `ProgressEvent` not `ErrorEvent`  (see #34748)
* `SwUpdate.available` is replaced by  `versionUpdates` with a `filter`
* `SwUpdate.activated` is replaced by the returned promised of `SwUpdate.activateUpdate`.

PR Close #49671
2023-04-17 14:04:27 +00:00
Matthieu Riegler 5d965803fe refactor(core): improve styling coverage (#49868)
The test was waiting for #34202 to be merged.

PR Close #49868
2023-04-17 14:02:41 +00:00
Matthieu Riegler 1e69a66864 docs: remove outdated/unsupported webworker doc (#49856)
The webworker platform has been removed in v11 by #38846

PR Close #49856
2023-04-17 14:01:42 +00:00
Matthieu Riegler b3adfe8002 refactor(docs-infra): remove dart support & mentions (#49857)
There is no need to keep the support for Dart here.

PR Close #49857
2023-04-17 14:00:49 +00:00
Qiuran Hu 94a98629ec docs: fix typo in Hierarchical injectors doc (#49824)
PR Close #49824
2023-04-17 13:59:10 +00:00
ChrTall a101632705 docs: Fixed Typo (#49753)
Fixed Typo
PR Close #49753
2023-04-17 13:58:16 +00:00
Matthieu Riegler 0b53082d2f refactor(core): throw an error when APP_INITIALIZER token is not an array. (#49860)
Providing a non-multi token for `APP_INITIALIZER` now throws `INVALID_MULTI_PROVIDER` (NG209)

PR Close #49860
2023-04-17 13:37:09 +00:00
Andrew Kushnir fedc75624c fix(core): include inner ViewContainerRef anchor nodes into ViewRef.rootNodes output (#49867)
Currently, the `ViewRef.rootNodes` output is missing anchor (comment) nodes for inner `ViewContainerRef`s,
when an achor node was created for that instance of a `ViewContainerRef` (which happens in all cases except
when an <ng-container> was used as a host for a view container).

This issue affects hydration logic, which relies on the number of root nodes within a view to properly determine
segments in DOM that belong to a particular view.

Resolves #49849.

PR Close #49867
2023-04-17 13:35:58 +00:00
Andrew Kushnir e341dbdb78 refactor(core): log hydration setup warning in dev mode only (#49876)
This commit updates the code to log hydration setup warning in dev mode only. Previously, the warning was retained in the code even after optimization, thus making it into production bundles. The warning is meant to let developers know that hydration was enabled, but wasn't activated, so it's safe to tree-shake it away from production bundles.

PR Close #49876
2023-04-17 13:34:53 +00:00
Andrew Kushnir 4e8c69d611 refactor(platform-server): refactor internal _render function (#49851)
The change in https://github.com/angular/angular/commit/8c3b92cfb3688b687f31ebe8024cd88676086931 inspired a followup refactor where the `_render` method can just accept a PlatformRef and an ApplicationRef instances directly.

PR Close #49851
2023-04-17 13:34:00 +00:00
Angular Robot bd0841eea4 build: update actions/checkout digest to 8e5e7e5 (#49815)
See associated pull request for more information.

PR Close #49815
2023-04-17 13:31:20 +00:00
Alan Agius 449c011ae4 refactor(platform-server): simplify _render method (#49840)
This commits simplifies the `_render` method by using async/await.

PR Close #49840
2023-04-14 15:28:41 -04:00
Alan Agius e594d1ca81 test(router): enable a subset of bootstrapping test to ran on node (#49843)
Some of these test can run on Node.js

PR Close #49843
2023-04-14 14:14:55 -04:00
Andrew Scott 98223c11ca fix(router): canceledNavigationResolution: 'computed' with redirects to the current URL (#49793)
The `canceledNavigationResolution: 'computed'` option does not correctly
assign page IDs or restore them when redirects result in navigating to
the current URL. This change ensures that the page IDs are still
incremented and restored correctly in this scenario.

PR Close #49793
2023-04-14 14:55:07 +00:00
Matthieu Riegler 31e1264faf ci: Remove environment files and EnableProdMode on integration tests (#49746)
Since v15, prod mode is handled by the CLI with the `optimization` flag. We can remove the environement files and `enableProdMode` when the tests use the CLI.

PR Close #49746
2023-04-14 14:13:34 +00:00
Matthieu Riegler 779b7c882a refactor(core): Remove NG_DEV_MODE const (#49838)
Follow up to #49530, removing the last remaining `NG_DEV_MODE`

PR Close #49838
2023-04-14 14:12:53 +00:00
Andrew Scott f0660cdc5f refactor(core): Do not need to set lView slots to null in createLView (#49836)
The slots are initialized to null in the tView blueprint

PR Close #49836
2023-04-14 14:12:23 +00:00
Andrew Scott 5449f06b63 test(core): re-add tests for signals in OnPush components (#49836)
These tests were accidentally deleted during a rebase.

PR Close #49836
2023-04-14 14:12:23 +00:00
Jessica Janiuk a19cc43f1d release: cut the v16.0.0-rc.1 release 2023-04-14 07:07:15 -07:00
Pawel Kozlowski c34d7e0822 fix(core): onDestroy should be registered only on valid DestroyRef (#49804)
It might happen that the lifecycle scope represented by DestroyRef becomes
invalid before an onDestroy hook is registered (ex. injector or component
instance got destroyed). In such cases registration of the onDestroy hooks
should no longer be possible.

Fixes #49658

PR Close #49804
2023-04-13 21:14:44 +00:00
Pawel Kozlowski 6ade3ec8c3 refactor(core): add asReadonly helper to writable signals (#49802)
The new asReadonly method on the WritableSignal interface makes
it possible to create readonly instance of a writable signal.

Readonly signals can be accessed to read their value,
but can't be changed using set, update or mutate methods.

PR Close #49802
2023-04-13 20:48:12 +00:00
Andrew Scott 87549af73c fix(core): Fix capitalization of toObservableOptions (#49832)
The capitalization of the interface should be pascal case.

PR Close #49832
2023-04-13 19:12:54 +00:00
Payam Valadkhan 970e8b40dc refactor(core): fix privately imported symbol from signals package (#49812)
The signals package is a separate target, and imports from it should go through its index.ts entrypoint.

PR Close #49812
2023-04-13 14:04:58 +00:00
Alan Agius 2a580b6f0b fix(http): HTTP cache was being disabled prematurely (#49826)
This commit fixes an issue were on the server the HTTP cache was being disabled prematurely which caused HTTP calls performed in `ngOnInit` life cycle hooks not to be cached.

PR Close #49826
2023-04-13 14:04:00 +00:00
Andrew Kushnir ed0f573368 refactor(core): avoid deep links into @angular/core (#49823)
This commit updates the code to avoid deep links into the `@angular/core`, which triggers a build issue in apps when a code is referenced.

PR Close #49823
2023-04-13 14:03:27 +00:00
Andrew Kushnir b1e587288a refactor(core): rename internal DI token that indicates whether hydration is enabled (#49800)
This commit renames an internal token to better align it with the naming of the function (to highlight the fact that it's responsible for DOM part of the hydration).

PR Close #49800
2023-04-13 14:02:33 +00:00
Matthieu Riegler 82788ded85 refactor(core): drop IE workarounds (#49763)
Angular doesn't support IE anymore. We can remove the workarounds related to IE.

Some workarounds are keep because of the support of domino but the comments related to IE are removed.

PR Close #49763
2023-04-13 14:01:46 +00:00
Danilo Bassi 95bc7e2c03 fix(http): prevent headers from throwing an error when initializing numerical values (#49379)
Some libraries could use numbers in headers. this fix prevents Angular from
throwing an error by casting those numerical values into strings.

Fixes #49353

PR Close #49379
2023-04-13 14:00:17 +00:00
Kristiyan Kostadinov 4721c48a24 fix(core): error if document body is null (#49818)
Fixes an error that came up internally which was being thrown, because in some cases the `document.body` might be null.

PR Close #49818
2023-04-12 12:51:53 -07:00
Andrew Kushnir 61f63cf6fd release: cut the v16.0.0-rc.0 release 2023-04-12 12:16:17 -07:00
Alan Agius fd13e11e75 test: improve testing of HTTP and transfer state cache (#49810)
This commit improves the HTTP transfer state integration test by using `provideClientHydration` method and validates that no HTTP calls are performed during the client bootstrapping.

PR Close #49810
2023-04-12 09:45:34 -07:00
Andrew Scott c7d8d3ee37 fix(core): toObservable should allow writes to signals in the effect (#49769)
`toObservable` creates an `effect` that watches for updates to the
source signal. We should allow writes to signals in this effect, which
would be consumed by downstream observers.

PR Close #49769
2023-04-12 09:35:56 -07:00
Andrew Scott 84216dabfc fix(core): catch errors from source signals outside of .next (#49769)
From Ben:

> When dealing with any reactive function call you don't control
> like `observer.next()` (or anything similar), you want to catch the error
> in the producer call, in this case `signal()`. You don't want to catch errors
> in the `observer.next` call itself.

PR Close #49769
2023-04-12 09:35:56 -07:00
Andrew Scott f43d407b28 refactor(core): rename from[Observable/Signal] => to[Signal/Observable] (#49769)
Based on feedback in the RFC, most would prefer `toSignal` and
`toObservable`.

PR Close #49769
2023-04-12 09:35:56 -07:00
Andrew Scott 6454ea1dab refactor(core): Update signal signature with respect to initial values (#49769)
The initial value used for signals by default is now `undefined`. In
addition, there is a new option to express that the signal should emit a
value synchronously (`requireSync: true`). When this value is specified,
the function will throw _on creation_ if the subscribing to the
`Observable` does not result in a synchronous emit.

PR Close #49769
2023-04-12 09:35:56 -07:00
Andrew Scott c82c17b994 refactor(router): Ensure data is bound to components in change detection following navigation (#49741)
`RouterOutlet` components can initialize _during_ change detection (for
example, if they exist in an embedded view). When this happens, data
from the router should be bound immediately to the routed components
rather than not being available until the next round of change
detection. This is mostly just a problem for testing because change
detection is triggered manually. It would be surprising to have to
detect changes _twice_ on the fixture in order to get data bound to the
routed component.

PR Close #49741
2023-04-12 09:33:11 -07:00
Andrew Scott ee337e1e59 refactor(router): Correct types of ActivatedRoute Observables (#49741)
The `ActivatedRoute` exposes several `Observable` members that are
`BehaviorSubject` under the hood. In order to update the values of those
subjects, we cast the `Observable` type internally. Instead, the
`BehaviorSubject` should be kept and re-exposed as public API
separately.

PR Close #49741
2023-04-12 09:33:11 -07:00
Angular Robot c9ed9f4a58 build: update dependency rimraf to v5 (#49757)
See associated pull request for more information.

PR Close #49757
2023-04-12 09:28:26 -07:00
Angular Robot d0d0ff12c4 build: update github/codeql-action action to v2.2.11 (#49775)
See associated pull request for more information.

PR Close #49775
2023-04-12 09:26:04 -07:00
Paul Gschwendtner 48af955547 ci: update pullapprove config to reflect currrent availability (#49786)
Updates the pullapprove config to reflect the current availability.

PR Close #49786
2023-04-12 09:25:22 -07:00
Jessica Janiuk ac3377bed0 docs: add information on how to run universal in conjunction with service worker (#49795)
PR Close #49795
2023-04-12 09:24:50 -07:00
Alan Agius 82525c064a docs: remove preboot reference from universal doc (#49808)
This package is no longer actively maintained and in general is not needed.

PR Close #49808
2023-04-12 09:24:06 -07:00
Alan Agius 15c91a53ae fix(http): delay accessing pendingTasks.whenAllTasksComplete (#49784)
Accessing `pendingTasks.whenAllTasksComplete` too early causes the `InitialRenderPendingTasks` to return a resolved promise too early. This commit changes the way we access `whenAllTasksComplete` to only happen when the application is stabilized.

PR Close #49784
2023-04-11 14:12:38 -07:00
Alan Agius 2f2ef14f9e fix(core): resolve InitialRenderPendingTasks promise on complete (#49784)
Current in the `InitialRenderPendingTasks` when the `collection` size is 0 a new promise is created a the status is changed to completed. This causes the promise that is created during the class initialization phase to never be resolved which causes SSR to hang indefinitely.

PR Close #49784
2023-04-11 14:12:38 -07:00
Andrew Scott 6623810e4d fix(compiler): Produce diagnositc if directive used in host binding is not exported (#49527)
The compiler currently does not check to make sure that directives in
the host bindings are exported. These directives are part of the public
API of the component so they do have to be.

PR Close #49527
2023-04-11 14:02:52 -07:00
Andrew Scott ed817e32fe fix(compiler-cli): Catch FatalDiagnosticError during template type checking (#49527)
This commit updates the type checking operation to catch
`FatalDiagnosticError` and surface them as diagnostics rather than
crashing.

Fixes https://github.com/angular/vscode-ng-language-service/issues/1881

PR Close #49527
2023-04-11 14:02:52 -07:00
Alan Agius 2eb9b8b402 fix(http): wait for all XHR requests to finish before stabilizing application (#49776)
Previously, since the `HttpXhrBackend` is a singleton, the macrotask was created and completed only for the initial request since it was stored as in property in the class instance. This commit replaces this logic to create a macro task for every XHR request.

Closes #49730

PR Close #49776
2023-04-11 13:44:30 -07:00
Pawel Kozlowski f8e25864e8 fix(core): allow async functions in effects (#49783)
This change makes is possible to use async functions
(ones returning a promise) as effect run functions.

To make it possible, the signature of the effect function
changed: effect cleanup function is registered now
(using a dedicated callback passed to the effect creation)
instead of being returned from the effect function.

PR Close #49783
2023-04-11 12:49:10 -07:00
Alex Rickabaugh a845a16755 refactor(core): fix privately imported symbol from signals package (#49789)
The signals package is a separate target, and imports from it should go
through its index.ts entrypoint.

PR Close #49789
2023-04-11 12:47:53 -07:00
Andrew Kushnir 2b3258f954 refactor(platform-server): include info about enabled features into ng-server-context (#49773)
This commit updates the logic that adds the "ng-server-context" attribute to the root elements to also include information about SSR feature enabled got an application.

PR Close #49773
2023-04-11 12:46:09 -07:00
Matthieu Riegler 9ecee3f505 refactor(platform-browser-dynamic): Drop IE related workarounds. (#49761)
IE is not supported by Angular anymore, we can drop IE specific code !

PR Close #49761
2023-04-11 12:45:10 -07:00
Kristiyan Kostadinov 9de1e9da8f fix(compiler): incorrectly matching directives on attribute bindings (#49713)
Fixes that the compiler was matching directives based on `attr` bindings which doesn't correspond to the runtime behavior. This wasn't a problem until now because the matched directives would basically be a noop, but they can cause issues with required inputs.

PR Close #49713
2023-04-11 12:40:58 -07:00
Alex Rickabaugh d980af6ff3 build(compiler): add a flag to conditionally build with the template pipeline (#48580)
This commit adds a Bazel flag which controls a constant in the compiler code.
When this flag (`--//packages/compiler:use_template_pipeline`) is specified, the
prototype template pipeline code is enabled.

This is not used in any production workflows and only works in the local Angular
repository. It will be used to develop the template pipeline against the
existing compliance tests.

PR Close #48580
2023-04-11 11:46:54 -07:00
Alex Rickabaugh 03c931c877 refactor(compiler): emit operation for the template pipeline (#48580)
This commit adds `transformTemplate` and `emitTemplateFn()` to the template
pipeline. These operations respectively apply all template compilation phases
in the right order, and then generate a final template function AST from the
template IR.

PR Close #48580
2023-04-11 11:46:54 -07:00
Alex Rickabaugh 5ec5253220 refactor(compiler): pipeline phase to convert semantic operations to statements (#48580)
This commit introduces `phaseReify()` which performs "reification" of IR
operations. This converts previously semantic operations (e.g. `ir.Element`)
into generated instruction calls (`element(...)`). At the end of reification,
all operations have been converted into `ir.StatementOp`s, and the IR AST should
be suitable for emitting as generated code.

Note that after reification, more transformations may still be applied. For
example, instruction chaining will be performed post-reification, since it
depends on the exact selected instructions for each operation.

PR Close #48580
2023-04-11 11:46:54 -07:00
Alex Rickabaugh b7c5d44f86 refactor(compiler): pipeline phase to name functions/variables in generated code (#48580)
This commit introduces a new pipeline phase `phaseNaming()`, which tags
operations that generate function and variable declarations with generated names
to use when emitting those operations.

Currently this phase is using placeholder names. Eventually, we will want to
align its output with the current `TemplateDefinitionBuilder` names, in order to
pass the existing tests.

PR Close #48580
2023-04-11 11:46:54 -07:00
Alex Rickabaugh bb8f686f9b refactor(compiler): pipeline phase to generate advance() instructions (#48580)
When executing the template update pass, the runtime keeps an internal
declaration slot pointer for which declaration (element, template, etc) is
the current subject of any binding or interpolation instructions. In between
update operations which reference different declarations, this pointer needs to
be adjusted, which is the job of the `advance()` instruction.

This commit introduces `phaseGenerateAdvance()` which inserts `advance()`
operations wherever necessary to satisfy this runtime requirement.

PR Close #48580
2023-04-11 11:46:54 -07:00
Alex Rickabaugh ed39b5283f refactor(compiler): pipeline phase to count variable slots (#48580)
Operations and expressions in component update blocks can make use of variable
slots for storing data between executions (for example, the previous values of
expressions to use in change detection comparisons). The runtime must be told
how many variable slots to allocate for each view in a component declaration.

This commit adds a `phaseVarCounting()` phase to count the number of variables
used in different operations and expressions in a view. It makes uses of a new
marker trait `ConsumesVarsTrait` to determine which operations & expressions to
consider.

PR Close #48580
2023-04-11 11:46:54 -07:00
Alex Rickabaugh 8a3f74b236 refactor(compiler): pipeline phase to handle declaration slot allocations (#48580)
Every declaration a template is stored in a data slot in the runtime. The
indices of these slots are passed to the declaration instructions in the
creation mode. In the update mode, several instructions (like `reference()` for
local references) also use the slot indices to reference declared items.

This commit introduces `phaseSlotAllocation()` to the template pipeline, which
allocates slots for declarations which need them, and propagates those slot
indices to other instructions which need to reference declared items via their
slot indices. To perform this association, the `XrefId` of the declared items
is used to link declarations with usages.

Slot allocation is abstracted from operations by the way of a new concept in the
pipeline: traits. A trait is a "mixin" on an operation, expression, or both that
allows phases to process any operation/expression which implements the trait
without needing specific logic for each concrete implementing type. Two traits
are introduced to support slot allocation: the `ConsumesSlotOpTrait` for
declarations which require a slot to be allocated, and the
`UsesSlotIndexExprTrait` for expressions which reference a declaration by its
slot index.

PR Close #48580
2023-04-11 11:46:54 -07:00
Alex Rickabaugh 2b1b51c157 refactor(compiler): pipeline phase to lift element attributes into const arrays (#48580)
This commit serializes the attributes on element-like structures in the template
and converts them to constant arrays, which it lifts into the `consts` array for
the entire component compilation.

PR Close #48580
2023-04-11 11:46:54 -07:00
Alex Rickabaugh e665f96e48 refactor(compiler): pipeline phase to merge sequential elementstart/elementend (#48580)
As an optimization, the runtime provides an `element()` instruction to use in
place of `elementStart()` and `elementEnd()` when there are no instructions
between them. This commit merges `ElementStart` and `ElementEnd` IR operations
into `Element` operations in that special case.

PR Close #48580
2023-04-11 11:46:53 -07:00
Alex Rickabaugh 89990bf5de refactor(compiler): pipeline phase to extract localref constants (#48580)
Local references declared on elements need to be represented in element/template
instructions via an index into the `consts` array. This commit adds the
`phaseLocalRefs()` phase to lift local reference declarations into the `consts`
array accordingly.

PR Close #48580
2023-04-11 11:46:53 -07:00
Alex Rickabaugh a407f0a218 refactor(compiler): pipeline phase to resolve view contexts (#48580)
`phaseResolveContexts()` resolves `ir.ContextExpr` expressions within views.
Each `ir.ContextExpr` represents a reference to a particular view context. For
the context of the view being compiled, this is available in the view's template
function `ctx` parameter. For parent views, this is available in context
variables which were added previously.

`phaseResolveContexts()` replaces these `ir.ContextExpr` operations with
resolved references to the requested views.

PR Close #48580
2023-04-11 11:46:53 -07:00
Alex Rickabaugh ce04fdcad1 refactor(compiler): pipeline phase to lexically resolve names in a view (#48580)
This commit introduces `phaseResolveNames()` to the template pipeline. This
phase processes any `ir.LexicalReadExpr`s, which represent unresolved
identifiers from the user's expressions in the template, and attempts to match
them to concepts in the lexical scope of the template (such as local refs) or
to a property read of a component or embedded view context.

PR Close #48580
2023-04-11 11:46:53 -07:00
Alex Rickabaugh 98613535c5 refactor(compiler): pipeline phase to generate variables (#48580)
This commit implements the first "phase" of the template pipeline. Phases are
individual steps in compilation that perform a transformation of the IR in order
to move closer to generating runtime code for the template.

This first phase is `phaseGenerateVariables()`. This phase introduces variable
definition operations into the IR to define variables in each view. These
variables either represent internal operations (saving/restoring the view
context for listeners, for example) or variables created from user-defined names
such as local references or template context properties.

Every view has all possibly-referenced variables generated, regardless of
whether they're actually referenced by other operations. A future phase will
optimize the variables in each view, inlining those which are only read once and
removing those which are not referenced at all.

PR Close #48580
2023-04-11 11:46:53 -07:00
Alex Rickabaugh 545ac46a42 refactor(compiler): ingest() operation for a template into the template pipeline (#48580)
This commit implements `ingest()`, which converts a parsed template AST into
template pipeline IR. This is the first step of template compilation.

PR Close #48580
2023-04-11 11:46:53 -07:00
Alex Rickabaugh 2e1fdb3e59 refactor(compiler): template pipeline ops/exprs to represent input templates (#48580)
This commit adds the IR operations and expressions required to "ingest" a
template into the template pipeline. They form the starting point for template
compilation.

Ingestion is implemented in a following commit.

PR Close #48580
2023-04-11 11:46:53 -07:00
Alex Rickabaugh 98b28548e7 refactor(compiler): introduce custom o.Expression types for template pipeline (#48580)
This commit adds support for custom derived `o.Expression` types in the template
pipeline. A base class is added with one current implementor
(`ir.LexicalReadExpr`). `ir.Expression`s encode semantic operations within
expression ASTs of IR operations.

PR Close #48580
2023-04-11 11:46:53 -07:00
Alex Rickabaugh 631200314b refactor(compiler): introduce the core of the template pipeline (#48580)
This commit introduces the "template pipeline", a new compilation flow for
template compilation. This new flow is intended to eventually replace the
`TemplateDefinitionBuilder`. For now, it's being implemented in parallel with
the existing system with the goal of eventually passing all of the existing
compliance tests.

The new pipeline is based on an "intermediate representation" of a template -
operations which semantically encode what needs to happen at runtime to render
and change-detect the template. Using an IR allows for different concerns of
template compilation to be processed independently, which solves the biggest
problem with `TemplateDefinitionBuilder` today (the lack of separation of
concerns).

This commit introduces the IR concept of an operation and related typings, as
well as the structures used to represent templates and views during compilation.
Future commits will expand on this foundation as work on the pipeline proceeds.

PR Close #48580
2023-04-11 11:46:53 -07:00
Andrew Kushnir 687f13884b ci: disable size tracking CI job in favor of integration tests size checks (#49788)
Currently we have multiple integration apps which are instrumented with the payload size checks. In addition to that, there is a separate CI job that performs similar checks. The checks in CI job are redundant, thus this commit disables a separate CI job.

PR Close #49788
2023-04-11 10:48:02 -07:00
Brandon Roberts 9f0c6d1ed1 fix(http): ensure new cache state is returned on each request (#49749)
The cache state is only used only the first server request. Restarting the server uses the cache on first request.

Subsequent requests skip the cache because the value is mutated.

This change ensures a new cache state is returned on every request.

PR Close #49749
2023-04-11 10:40:04 -07:00
Nikola Kološnjaji a6475a1a7a docs: Typo (#49781)
PR Close #49781
2023-04-11 10:27:54 -07:00
Paul Gschwendtner 4373003d20 build: create script to update integration lock files (#49787)
* Adds a small script to conveniently re-generate lock files for
  integration tests.
* Updates the `.gitignore` for integration tests to ignore node
  modules. Some tests do not have a `.gitignore` (like the CLI
  boilerplate tests).

PR Close #49787
2023-04-11 10:26:44 -07:00
Paul Gschwendtner 222f795bda build: sort integration package.json dependencies (#49787)
This commits contains changes proposes by running `yarn install`
for these integration tests.

PR Close #49787
2023-04-11 10:26:43 -07:00
Paul Gschwendtner 515c23812c build: re-add lock files for integration tests (#49787)
The lock files for integration tests have been accidentally
removed with: https://github.com/angular/angular/commit/612eaca3c55b1304e0018abc1ee10aba27b642a7

This commit re-adds them.

PR Close #49787
2023-04-11 10:26:43 -07:00
De Wildt a46b76132e revert "fixup! fix(router): fix = not parsed in router segment name" (#47332)
This reverts commit 2279f4d4620eba083a9832ed096890b69a25ec42.

Reverting that commit based off PR feedback that this change should only affect the parsing of sergments and node encoding of the url

PR Close #47332
2023-04-11 09:16:31 -07:00
dewildt 6193a3d406 fix(router): fix = not parsed in router segment name (#47332)
fix router segment name parsing to allow segements to container an unscaped = character. Currently if you have a url like /some-site/folder=/some-file then then middle segment "folder=" will stop parsing at the = sign and register that part of the path as just "folder"

Fixes #21381

PR Close #47332
2023-04-11 09:16:31 -07:00
Andrew Kushnir 898eecbfef build: update minimum supported Node version from 16.13.0 -> 16.14.0 (#49771)
This commit updates the minimum supported Node version across packages from 16.13.0 -> 16.14.0 to ensure compatibility with dependencies.

PR Close #49771
2023-04-11 07:56:31 -07:00
Andrew Kushnir d890988862 ci: move error pages outside of the public-api group (#49770)
Currently, a change in an error guide triggers a review for the `public-api` group (requests 3 reviewers and al least 2 must approve). This is overly aggressive and we can relax this by moving the guides under `fw-core` and extended diagnistics under `fw-compiler`. In this case 1 reviewer would be requested.

PR Close #49770
2023-04-10 13:29:57 -07:00
Andrew Kushnir 4df45d81eb docs: adding a note on comment nodes in the server-rendered output (#49765)
PR Close #49765
2023-04-10 12:24:20 -07:00
Kristiyan Kostadinov b97ca56eca refactor(migrations): log a link to the standalone migration (#49752)
Resolves an old TODO about adding a link to the standalone migration guide.

PR Close #49752
2023-04-10 09:04:05 -07:00
Andrew Kushnir 46ee65ad0f refactor(core): do not enable hydration when server response was incorrect (#49750)
This commit updates the logic to avoid enabling hydration in case server response doesn't contain hydration-related info serialized. It can happen when `provideClientHydration()` call only happens on the client, but not on the server.

PR Close #49750
2023-04-10 09:03:21 -07:00
Matthieu Riegler a605949093 docs: update docs about prodMode. (#49745)
Following angular#49723, this commit updates the doc to reflect the actual message prompted in the console.

PR Close #49745
2023-04-10 09:02:31 -07:00
Andrew Kushnir bab36d0c57 refactor(core): add a warning when hydration annotation is missing in server response (#49743)
This commit updates the logic to detect a situation when hydration support was enabled only on the client. If that happens, Angular produces a warning in a console with a link to the error guide.

PR Close #49743
2023-04-07 09:41:55 -07:00
Joey Perrott dfb234962b ci: remove lock-closed action (#49650)
Remove the lock-closed asction as it has been centralized within dev-infra

PR Close #49650
2023-04-06 15:37:14 -07:00
Matthieu Riegler c713d9fe66 docs: Improve previous version navigation (#49063)
In archive mode the link to the current doc will now point to same page.
If the page doesn't exist anymore, it will show a contextualized warning message.

See #46850

PR Close #49063
2023-04-06 11:07:04 -07:00
Andrew Kushnir 176f9eaecd refactor(core): update the link in hydration stats message (#49728)
Currently, the link points to https://angular.io/guides/hydration and there are 2 issues with it: the `guides/hydration` should actually be `guide/hydration` and the guide is only available at https://next.angular.io, but not at https://angular.io. It will be available at https://angular.io once v16 final is released. For now, we can point to https://next.angular.io, so that developers testing hydration during the pre-release period can follow the link.

PR Close #49728
2023-04-06 11:01:00 -07:00
Andrew Kushnir 755b52faf8 refactor(core): drop a reference to enableProdMode() in a console.log (#49723)
New `ng new` apps no longer generate `enableProdMode` calls when an app is created. The prod mode is enabled via CLI flags (and configuration in the `angular.json` if needed).

PR Close #49723
2023-04-06 11:00:26 -07:00
Andrew Kushnir 3d69abb224 refactor(core): skip hydration for components that use ShadowDom encapsulation (#49722)
The Domino DOM emulation library doesn't support shadow DOM. For such components we can not guarantee that client and server representations would match perfectly. To avoid hydration mismatch errors, such components are opted out of hydration.

PR Close #49722
2023-04-06 10:59:27 -07:00
Andrew Kushnir 77b354851a refactor(core): skip hydration for components that use i18n (instead of throwing an error) (#49722)
Currently, non-destructive hydration for i18n blocks is not supported (but support is coming!).
This commit updates the serialization logic from throwing an error when it comes across an i18n
block to annotating a component with a skip hydration flag.

PR Close #49722
2023-04-06 10:59:26 -07:00
Dylan Hunn f14875114b release: cut the v16.0.0-next.7 release 2023-04-05 19:57:53 -07:00
1089 changed files with 136987 additions and 24520 deletions
+10 -11
View File
@@ -11,29 +11,28 @@ aio/tools/examples/shared/node_modules
aio/tools/examples/shared/example-scaffold
# All integration test node_modules folders
integration/animations/node_modules
integration/cli-elements-universal/node_modules
integration/cli-hello-world/node_modules
integration/cli-hello-world-ivy-compat/node_modules
integration/cli-hello-world-ivy-i18n/node_modules
integration/cli-hello-world-ivy-minimal/node_modules
integration/cli-hello-world-lazy/node_modules
integration/cli-hello-world-ts-47/node_modules
integration/cli-hello-world-mocha/node_modules
integration/dynamic-compiler/node_modules
integration/hello_world__closure/node_modules
integration/hello_world__systemjs_umd/node_modules
integration/i18n/node_modules
integration/forms/node_modules
integration/injectable-def/node_modules
integration/ivy-i18n/node_modules
integration/ng-add-localize/node_modules
integration/trusted-types/node_modules
integration/forms/node_modules
integration/ng_elements/node_modules
integration/ng_elements_schematics/node_modules
integration/ng_update/node_modules
integration/ng_update_migrations/node_modules
integration/nodenext_resolution/node_modules
integration/npm_package_archives.bzl/node_modules
integration/platform-server/node_modules
integration/service-worker-schema/node_modules
integration/side-effects/node_modules
integration/standalone-bootstrap/node_modules
integration/terser/node_modules
integration/typings_test_ts36/node_modules
integration/typings_test_ts37/node_modules
integration/trusted-types/node_modules
integration/typings_test_rxjs7/node_modules
integration/typings_test_ts49/node_modules
integration/typings_test_ts50/node_modules
+9 -7
View File
@@ -89,7 +89,7 @@ executors:
type: string
default: medium
docker:
- image: cimg/node:16.13.0
- image: cimg/node:16.14.0
resource_class: << parameters.resource_class >>
working_directory: ~/ng
@@ -99,7 +99,7 @@ executors:
type: string
default: medium
docker:
- image: cimg/node:16.13.0-browsers
- image: cimg/node:16.14.0-browsers
resource_class: << parameters.resource_class >>
working_directory: ~/ng
@@ -275,7 +275,6 @@ jobs:
steps:
- custom_attach_workspace
- init_environment
- install_java
- run:
# We need to explicitly specify the --symlink_prefix option because otherwise we would
# not be able to easily find the output bin directory when uploading artifacts for size
@@ -309,18 +308,21 @@ jobs:
# container for this job. This is necessary because we launch a lot of browsers concurrently
# and therefore the tunnel and Karma need to process a lot of file requests and tests.
resource_class: xlarge
environment:
NUMBER_OF_PARALLEL_BROWSERS: 2
steps:
- custom_attach_workspace
- init_environment
- init_saucelabs_environment
- run:
name: Start Saucelabs daemon service
command: yarn bazel run //tools/saucelabs-daemon/background-service -- ${NUMBER_OF_PARALLEL_BROWSERS}
background: true
- run:
name: Run Bazel tests on Saucelabs
# See /tools/saucelabs/README.md for more info
command: |
yarn bazel run //tools/saucelabs:sauce_service_setup
TESTS=$(./node_modules/.bin/bazelisk query --output label '(kind(karma_web_test, ...) intersect attr("tags", "saucelabs", ...)) except attr("tags", "fixme-saucelabs", ...)')
yarn bazel test --config=saucelabs ${TESTS}
yarn bazel run //tools/saucelabs:sauce_service_stop
yarn bazel test --config=saucelabs --jobs=${NUMBER_OF_PARALLEL_BROWSERS} ${TESTS}
no_output_timeout: 40m
- notify_webhook_on_fail:
webhook_url_env_var: SLACK_DEV_INFRA_CI_FAILURES_WEBHOOK_URL
+1 -1
View File
@@ -4,7 +4,7 @@ description: 'Installs the dependencies using Yarn'
runs:
using: 'composite'
steps:
- uses: actions/cache@940f3d7cf195ba83374c77632d1e2cbb2f24ae68 # v3
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: |
./node_modules/
+2 -3
View File
@@ -1,8 +1,8 @@
# Configuration for angular-robot
#options for the size plugin
# options for the size plugin
size:
disabled: false
disabled: true
maxSizeIncrease: 2000
circleCiStatusName: 'ci/circleci: test'
@@ -70,7 +70,6 @@ merge:
requiredStatuses:
- 'ci/circleci: build'
- 'ci/circleci: lint'
- 'ci/angular: size'
- 'google-internal-tests'
- 'pullapprove'
+3 -3
View File
@@ -22,10 +22,10 @@ jobs:
(github.event.action == 'labeled' && github.event.label.name == 'aio: preview') ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'aio: preview'))
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: ./.github/actions/yarn-install
- uses: angular/dev-infra/github-actions/setup-bazel-remote-exec@8b7f6b94197d14448c7fcc0e1bd4aa74a66f99aa
- uses: angular/dev-infra/github-actions/setup-bazel-remote-exec@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
bazelrc: ./.bazelrc.user
@@ -34,7 +34,7 @@ jobs:
# the number of concurrent actions is determined based on the host resources.
- run: bazel build //aio:build --jobs=32 --announce_rc --verbose_failures
- uses: angular/dev-infra/github-actions/deploy-previews/pack-and-upload-artifact@8b7f6b94197d14448c7fcc0e1bd4aa74a66f99aa
- uses: angular/dev-infra/github-actions/deploy-previews/pack-and-upload-artifact@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
workflow-artifact-name: 'aio'
pull-number: '${{github.event.pull_request.number}}'
+2 -2
View File
@@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- name: Configure Firebase deploy target
working-directory: aio/
@@ -34,7 +34,7 @@ jobs:
npx -y firebase-tools@latest target:clear --project ${{env.PREVIEW_PROJECT}} hosting aio
npx -y firebase-tools@latest target:apply --project ${{env.PREVIEW_PROJECT}} hosting aio ${{env.PREVIEW_SITE}}
- uses: angular/dev-infra/github-actions/deploy-previews/upload-artifacts-to-firebase@8b7f6b94197d14448c7fcc0e1bd4aa74a66f99aa
- uses: angular/dev-infra/github-actions/deploy-previews/upload-artifacts-to-firebase@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
github-token: '${{secrets.GITHUB_TOKEN}}'
workflow-artifact-name: 'aio'
@@ -13,9 +13,9 @@ jobs:
assistant_to_the_branch_manager:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
persist-credentials: false
- uses: angular/dev-infra/github-actions/branch-manager@8b7f6b94197d14448c7fcc0e1bd4aa74a66f99aa
- uses: angular/dev-infra/github-actions/branch-manager@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+4 -4
View File
@@ -12,14 +12,14 @@ jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: angular/dev-infra/github-actions/commit-message-based-labels@8b7f6b94197d14448c7fcc0e1bd4aa74a66f99aa
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: angular/dev-infra/github-actions/commit-message-based-labels@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
post_approval_changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: angular/dev-infra/github-actions/post-approval-changes@8b7f6b94197d14448c7fcc0e1bd4aa74a66f99aa
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: angular/dev-infra/github-actions/post-approval-changes@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+1 -1
View File
@@ -14,6 +14,6 @@ jobs:
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
steps:
- uses: angular/dev-infra/github-actions/feature-request@8b7f6b94197d14448c7fcc0e1bd4aa74a66f99aa
- uses: angular/dev-infra/github-actions/feature-request@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+3 -3
View File
@@ -12,9 +12,9 @@ jobs:
trigger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: angular/dev-infra/github-actions/google-internal-tests@8b7f6b94197d14448c7fcc0e1bd4aa74a66f99aa
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: angular/dev-infra/github-actions/google-internal-tests@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
run-tests-guide-url: http://go/angular/g3sync
run-tests-guide-url: http://go/angular-g3sync-start
github-token: ${{ secrets.GITHUB_TOKEN }}
sync-config: ./.ng-dev/google-sync-config.json
-19
View File
@@ -1,19 +0,0 @@
name: Lock closed inactive issues
on:
schedule:
# Run at 16:00 every day
- cron: '0 16 * * *'
# Declare default permissions as read only.
permissions:
contents: read
jobs:
lock_closed:
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
steps:
- uses: angular/dev-infra/github-actions/lock-closed@8b7f6b94197d14448c7fcc0e1bd4aa74a66f99aa
with:
lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }}
+1 -1
View File
@@ -9,6 +9,6 @@ jobs:
status:
runs-on: ubuntu-latest
steps:
- uses: angular/dev-infra/github-actions/unified-status-check@8b7f6b94197d14448c7fcc0e1bd4aa74a66f99aa
- uses: angular/dev-infra/github-actions/unified-status-check@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+2 -2
View File
@@ -25,7 +25,7 @@ jobs:
steps:
- name: 'Checkout code'
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
persist-credentials: false
@@ -47,6 +47,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
uses: github/codeql-action/upload-sarif@29b1f65c5e92e24fe6b6647da1eaabe529cec70f # v2.3.3
with:
sarif_file: results.sarif
+2 -2
View File
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
@@ -32,7 +32,7 @@ jobs:
env:
ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN }}
- name: Create a PR (if necessary)
uses: angular/dev-infra/github-actions/create-pr-for-changes@8b7f6b94197d14448c7fcc0e1bd4aa74a66f99aa
uses: angular/dev-infra/github-actions/create-pr-for-changes@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
branch-prefix: update-cli-help
pr-title: 'docs: update Angular CLI help [${{github.ref_name}}]'
+2 -2
View File
@@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
@@ -35,7 +35,7 @@ jobs:
- name: Generate `events.json`
run: node aio/scripts/generate-events/index.mjs --ignore-invalid-dates
- name: Create a PR (if necessary)
uses: angular/dev-infra/github-actions/create-pr-for-changes@8b7f6b94197d14448c7fcc0e1bd4aa74a66f99aa
uses: angular/dev-infra/github-actions/create-pr-for-changes@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
branch-prefix: docs-update-events
pr-title: 'docs: update events'
-2
View File
@@ -29,8 +29,6 @@ export const commitMessage: CommitMessageConfig = {
'platform-browser',
'platform-browser-dynamic',
'platform-server',
'platform-webworker',
'platform-webworker-dynamic',
'router',
'service-worker',
'upgrade',
+1 -1
View File
@@ -1 +1 @@
16.13.0
16.14.0
+16 -30
View File
@@ -58,7 +58,7 @@ version: 3
availability:
users_unavailable:
- devversion
- atscott
# Meta field that goes unused by PullApprove to allow for defining aliases to be
# used throughout the config.
@@ -158,13 +158,15 @@ groups:
'aio/content/guide/angular-compiler-options.md',
'aio/content/guide/aot-compiler.md',
'aio/content/guide/aot-metadata-errors.md',
'aio/content/guide/template-typecheck.md'
'aio/content/guide/template-typecheck.md',
'aio/content/extended-diagnostics/*.md'
])
reviewers:
users:
- alxhub
- AndrewKushnir
- atscott
- crisbeto
- JoostK
# =========================================================
@@ -203,6 +205,7 @@ groups:
'aio/content/guide/architecture-services.md',
'aio/content/guide/architecture.md',
'aio/content/examples/architecture/**/{*,.*}',
'aio/content/guide/rxjs-interop.md',
'aio/content/images/guide/architecture/**/{*,.*}',
'aio/content/guide/attribute-directives.md',
'aio/content/examples/attribute-directives/**/{*,.*}',
@@ -216,31 +219,12 @@ groups:
'aio/content/images/guide/change-detection/**/{*,.*}',
'aio/content/guide/class-binding.md',
'aio/content/guide/cheatsheet.md',
'aio/content/guide/component/component-content-projection-complex.md',
'aio/content/guide/component/component-content-projection-conditional.md',
'aio/content/guide/component/component-content-projection-multi-slot.md',
'aio/content/guide/component/component-content-projection-overview.md',
'aio/content/guide/component/component-content-projection-single-slot.md',
'aio/content/guide/component/component-create-cli.md',
'aio/content/guide/component/component-create-manual.md',
'aio/content/guide/component/component-example-dynamic-load.md',
'aio/content/guide/component/component-example-interaction.md',
'aio/content/guide/component/component-example.md',
'aio/content/guide/component/component-exchange-data.md',
'aio/content/guide/component/component-lifecycle-overview.md',
'aio/content/guide/component/component-overview.md',
'aio/content/guide/component/component-share-data-overview.md',
'aio/content/guide/component/component-share-data-to-child.md',
'aio/content/guide/component/component-share-data-to-parent.md',
'aio/content/guide/component/component-structure.md',
'aio/content/guide/component/component-style-overview.md',
'aio/content/guide/component/component-style-view-encapsulate.md',
'aio/content/guide/component/component-style.md',
'aio/content/guide/component/component-use-overview.md',
'aio/content/guide/component-interaction.md',
'aio/content/examples/component-interaction/**/{*,.*}',
'aio/content/images/guide/component-interaction/**/{*,.*}',
'aio/content/guide/component-overview.md',
'aio/content/errors/*.md',
'aio/content/examples/errors/**/{*,.*}',
'aio/content/examples/component-overview/**/{*,.*}',
'aio/content/guide/component-styles.md',
'aio/content/guide/developer-guide-overview.md',
@@ -280,8 +264,6 @@ groups:
'aio/content/guide/lazy-loading-ngmodules.md',
'aio/content/examples/lazy-loading-ngmodules/**/{*,.*}',
'aio/content/images/guide/lazy-loading-ngmodules/**/{*,.*}',
'aio/content/guide/lifecycle-hook/lifecycle-hook-example.md',
'aio/content/guide/lifecycle-hook/lifecycle-hook-overview.md',
'aio/content/guide/lifecycle-hooks.md',
'aio/content/examples/lifecycle-hooks/**/{*,.*}',
'aio/content/images/guide/lifecycle-hooks/**/{*,.*}',
@@ -353,13 +335,15 @@ groups:
'aio/content/examples/view-encapsulation/**/{*,.*}',
'aio/content/images/guide/view-encapsulation/**/{*,.*}',
'aio/content/special-elements/**/{*,.*}',
'aio/content/guide/hydration.md'
'aio/content/guide/hydration.md',
'aio/content/guide/signals.md'
])
reviewers:
users:
- alxhub
- AndrewKushnir
- atscott
- crisbeto
- dylhunn
- jessicajaniuk
- pkozlowski-opensource
@@ -851,6 +835,7 @@ groups:
'aio/content/images/guide/toh/**/{*,.*}',
'aio/content/demos/first-app/**/{*,.*}',
'aio/content/examples/first-app-*/**/{*,.*}',
'aio/content/images/guide/faa/**/{*,.*}',
'aio/content/examples/toh-pt0/**/{*,.*}',
'aio/content/examples/toh-pt1/**/{*,.*}',
'aio/content/examples/toh-pt2/**/{*,.*}',
@@ -943,8 +928,10 @@ groups:
'aio/content/guide/migration-module-with-providers.md',
'aio/content/guide/static-query-migration.md',
'aio/content/guide/update-to-latest-version.md',
'aio/content/guide/versions.md',
'aio/content/guide/update-to-version-14.md',
'aio/content/guide/update-to-version-15.md'
'aio/content/guide/update-to-version-15.md',
'aio/content/guide/update-to-version-16.md',
])
reviewers:
users:
@@ -1018,6 +1005,7 @@ groups:
'aio/content/guide/workspace-config.md',
'aio/content/guide/migration-solution-style-tsconfig.md',
'aio/content/guide/migration-update-libraries-tslib.md',
'aio/content/guide/esbuild.md',
])
reviewers:
users:
@@ -1178,6 +1166,7 @@ groups:
'tools/legacy-saucelabs/**/{*,.*}',
'tools/rxjs/**/{*,.*}',
'tools/saucelabs/**/{*,.*}',
'tools/saucelabs-daemon/**/{*,.*}',
'tools/symbol-extractor/**/{*,.*}',
'tools/testing/**/{*,.*}',
'tools/tslint/**/{*,.*}',
@@ -1204,11 +1193,8 @@ groups:
'goldens/public-api/**/{*,.*}',
'docs/NAMING.md',
'aio/content/guide/angular-package-format.md',
'aio/content/errors/*.md',
'aio/content/extended-diagnostics/*.md',
'aio/content/guide/glossary.md',
'aio/content/guide/styleguide.md',
'aio/content/examples/errors/**/{*,.*}',
'aio/content/examples/styleguide/**/{*,.*}',
'aio/content/images/guide/styleguide/{*,.*}'
])
+18
View File
@@ -1,4 +1,5 @@
load("//tools:defaults.bzl", "nodejs_binary")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("//:yarn.bzl", "YARN_PATH")
package(default_visibility = ["//visibility:public"])
@@ -26,6 +27,14 @@ alias(
actual = "//packages:tsconfig-build.json",
)
js_library(
name = "browser-providers",
srcs = [
"browser-providers.conf.d.ts",
"browser-providers.conf.js",
],
)
filegroup(
name = "angularjs_scripts",
srcs = [
@@ -61,3 +70,12 @@ nodejs_binary(
"//integration:__subpackages__",
],
)
alias(
name = "sauce_connect",
actual = select({
"@npm//@angular/build-tooling/bazel/constraints:linux_x64": "@sauce_connect_linux_amd64//:bin/sc",
"@npm//@angular/build-tooling/bazel/constraints:macos_x64": "@sauce_connect_mac//:bin/sc",
"@npm//@angular/build-tooling/bazel/constraints:macos_arm64": "@sauce_connect_mac//:bin/sc",
}),
)
+253 -2954
View File
File diff suppressed because it is too large Load Diff
+2618
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License
Copyright (c) 2010-2022 Google LLC. https://angular.io/license
Copyright (c) 2010-2023 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
@@ -1,4 +1,4 @@
<h1 align="center">Angular - The modern web developer's platform.</h1>
<h1 align="center">Angular - The modern web developer's platform</h1>
<p align="center">
<img src="aio/src/assets/images/logos/angular/angular.png" alt="angular-logo" width="120px" height="120px"/>
+27 -8
View File
@@ -26,12 +26,10 @@ http_archive(
http_archive(
name = "build_bazel_rules_nodejs",
patches = [
# TODO(devversion): remove when https://github.com/bazelbuild/rules_nodejs/pull/3605 is available.
"//tools:bazel-repo-patches/rules_nodejs__#3605.patch",
"//tools/esm-interop:patches/bazel/nodejs_binary_esm_support.patch",
],
sha256 = "c29944ba9b0b430aadcaf3bf2570fece6fc5ebfb76df145c6cdad40d65c20811",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.7.0/rules_nodejs-5.7.0.tar.gz"],
sha256 = "94070eff79305be05b7699207fbac5d2608054dd53e6109f7d00d923919ff45a",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.2/rules_nodejs-5.8.2.tar.gz"],
)
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
@@ -40,6 +38,8 @@ build_bazel_rules_nodejs_dependencies()
# The PKG rules are needed to build tar packages for integration tests. The builtin
# rule in `@bazel_tools` is not Windows compatible and outdated.
# NOTE: We cannot move past version 0.6.0 as pkg_tar no longer works on directories, which rules_nodejs
# relies on for node_modules setup.
http_archive(
name = "rules_pkg",
sha256 = "62eeb544ff1ef41d786e329e1536c1d541bb9bcad27ae984d57f18f314018e66",
@@ -50,6 +50,8 @@ http_archive(
)
# Fetch Aspect lib for utilities like write_source_files
# NOTE: We cannot move past version 1.23.2 of aspect_bazel_lib because it requires us to move to bazel 6.0.0 which
# breaks our usage of managed_directories
http_archive(
name = "aspect_bazel_lib",
sha256 = "4b2e774387bae6242879820086b7b738d49bf3d0659522ea5d9363be01a27582",
@@ -62,7 +64,7 @@ load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "nodejs",
node_version = "16.13.0",
node_version = "16.14.0",
)
# Download npm dependencies.
@@ -192,10 +194,10 @@ cldr_xml_data_repository(
# sass rules
http_archive(
name = "io_bazel_rules_sass",
sha256 = "456df159ed48f7df4d40b2c5a41bf9dcb343cacbac561af4b0e5334c5eb14af1",
strip_prefix = "rules_sass-3d2ad4702a9610e97dadbe345e3566cc19e72ad6",
sha256 = "44e325c09a8a97c0b6f918400c10836fa61753c576e77ca74ec682c6ecc518c0",
strip_prefix = "rules_sass-236d2fc016738820e8dc6bea483074034c66ec0a",
urls = [
"https://github.com/bazelbuild/rules_sass/archive/3d2ad4702a9610e97dadbe345e3566cc19e72ad6.zip",
"https://github.com/bazelbuild/rules_sass/archive/236d2fc016738820e8dc6bea483074034c66ec0a.zip",
],
)
@@ -213,3 +215,20 @@ register_toolchains(
"@npm//@angular/build-tooling/bazel/git-toolchain:git_macos_arm64_toolchain",
"@npm//@angular/build-tooling/bazel/git-toolchain:git_windows_toolchain",
)
# Fetch sauce connect (tool to open Saucelabs tunnel for Saucelabs browser tests)
http_archive(
name = "sauce_connect_linux_amd64",
build_file_content = """exports_files(["bin/sc"], visibility = ["//visibility:public"])""",
sha256 = "26b9c3630f441b47854b6032f7eca6f1d88d3f62e50ee44c27015d71a5155c36",
strip_prefix = "sc-4.8.2-linux",
url = "https://saucelabs.com/downloads/sc-4.8.2-linux.tar.gz",
)
http_archive(
name = "sauce_connect_mac",
build_file_content = """exports_files(["bin/sc"], visibility = ["//visibility:public"])""",
sha256 = "28277ce81ef9ab84f5b87b526258920a8ead44789a5034346e872629bbf38089",
strip_prefix = "sc-4.8.2-osx",
url = "https://saucelabs.com/downloads/sc-4.8.2-osx.zip",
)
+177 -23
View File
@@ -13,60 +13,214 @@
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"plugins": [
"@typescript-eslint",
"@angular-eslint",
"eslint-plugin-jsdoc",
"eslint-plugin-import",
"eslint-plugin-jsdoc",
"eslint-plugin-prefer-arrow"
],
"rules": {
"@typescript-eslint/ban-types": "error",
"@angular-eslint/component-class-suffix": "error",
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "aio",
"style": "kebab-case"
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/contextual-lifecycle": "error",
"@angular-eslint/directive-class-suffix": "error",
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "aio",
"style": "camelCase"
"style": "camelCase",
"type": "attribute"
}
],
"dot-notation": "error",
"indent": "off",
"max-len": ["error", 120],
"@typescript-eslint/member-delimiter-style": ["error", {
"singleline": {
"delimiter": "comma",
"requireLast": false
"@angular-eslint/no-conflicting-lifecycle": "error",
"@angular-eslint/no-host-metadata-property": "off",
"@angular-eslint/no-input-rename": "error",
"@angular-eslint/no-inputs-metadata-property": "error",
"@angular-eslint/no-output-native": "error",
"@angular-eslint/no-output-on-prefix": "error",
"@angular-eslint/no-output-rename": "error",
"@angular-eslint/no-outputs-metadata-property": "error",
"@angular-eslint/use-lifecycle-interface": "error",
"@angular-eslint/use-pipe-transform-interface": "error",
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/member-delimiter-style": [
"error",
{
"singleline": {
"delimiter": "comma",
"requireLast": false
}
}
}],
],
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/naming-convention": "off",
"no-console": ["error", {"allow": ["log", "warn", "error"]}],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": [
"error",
{
"ignoreParameters": true
}
],
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-shadow": [
"error"
],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"@typescript-eslint/semi": [
"error",
"always"
],
"@typescript-eslint/triple-slash-reference": [
"error",
{
"lib": "always",
"path": "always",
"types": "prefer-import"
}
],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error",
"arrow-body-style": "error",
"arrow-parens": "off",
"comma-dangle": "off",
"complexity": "off",
"constructor-super": "error",
"curly": "error",
"dot-notation": "error",
"eol-last": "error",
"eqeqeq": [
"error",
"smart"
],
"guard-for-in": "error",
"id-denylist": [
"error",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"id-match": "error",
"import/no-deprecated": "warn",
"indent": "off",
"jsdoc/check-alignment": "error",
"jsdoc/newline-after-description": "error",
"jsdoc/no-types": "error",
"max-classes-per-file": "off",
"max-len": [
"error",
120
],
"new-parens": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": [
"error",
{
"allow": [
"log",
"warn",
"error"
]
}
],
"no-debugger": "error",
"no-empty": "off",
"no-empty-function": "off",
"@angular-eslint/no-host-metadata-property": "off",
"no-eval": "error",
"no-fallthrough": "error",
"no-invalid-this": "off",
"no-multiple-empty-lines": "off",
"no-new-wrappers": "error",
"no-restricted-imports": [
"error",
{
"message": "Please import directly from 'rxjs' instead",
"name": "rxjs/Rx"
}
],
"no-restricted-syntax": [
"error",
{
"selector": "CallExpression[callee.name=/^(fdescribe|fit)$/]",
"message": "Don't keep jasmine focus methods."
"message": "Don't keep jasmine focus methods.",
"selector": "CallExpression[callee.name=/^(fdescribe|fit)$/]"
}
],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
"no-tabs": "error",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-underscore-dangle": "off",
"no-unsafe-finally": "error",
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": ["error"],
"no-unused-labels": "error",
"no-use-before-define": "off",
"no-var": "error",
"object-shorthand": "error",
"one-var": [
"error",
"never"
],
"prefer-arrow/prefer-arrow-functions": "off",
"prefer-const": "error",
"quote-props": [
"error",
"as-needed"
],
"quotes": "off",
"@typescript-eslint/quotes": ["error", "single", {"avoidEscape": true}],
"semi": "error"
"radix": "error",
"sort-keys": "off",
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"asyncArrow": "always",
"named": "never"
}
],
"use-isnan": "error",
"valid-typeof": "off"
}
},
{
+2 -2
View File
@@ -36,7 +36,7 @@
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": ["zone.js"],
"ngswConfigPath": "src/generated/ngsw-config.json",
"tsConfig": "tsconfig.app.json",
"webWorkerTsConfig": "tsconfig.worker.json",
@@ -216,7 +216,7 @@
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"webWorkerTsConfig": "tsconfig.worker.json",
"karmaConfig": "karma.conf.js",
+2 -2
View File
@@ -1,4 +1,4 @@
{
"branchName": "refs/heads/main",
"sha": "561ebf8b024e204d6b11a53db0dc1d16d57957ee"
"branchName": "refs/heads/16.0.x",
"sha": "3eb2dbcb12e58dc0139b631b936fe15fe0f69094"
}
+1 -1
View File
@@ -30,7 +30,7 @@
{
"name": "version",
"type": "string",
"description": "Contains the version of Angular to use for the documentation. If not provided, the command uses your current Angular core version."
"description": "The version of Angular to use for the documentation. If not provided, the command uses your current Angular core version."
}
]
}
+7 -1
View File
@@ -76,7 +76,7 @@
{
"name": "root-module-file-name",
"type": "string",
"default": "app.server.module.ts",
"default": "app.module.server.ts",
"description": "The name of the root module file"
},
{
@@ -692,6 +692,12 @@
"type": "boolean",
"default": false,
"description": "Do not update \"tsconfig.json\" to add a path mapping for the new library. The path mapping is needed to use the library in an app, but can be disabled here to simplify development."
},
{
"name": "standalone",
"type": "boolean",
"default": false,
"description": "Creates a library based upon the standalone API, without NgModules."
}
],
"aliases": [
+3 -3
View File
@@ -20,12 +20,12 @@ For details about changes between versions, and information about updating from
Invoke the tool on the command line through the `ng` executable.
Online help is available on the command line.
Enter the following to list commands or options for a given command \(such as [generate](cli/generate)\) with a short description.
Enter the following to list commands or options for a given command \(such as [new](cli/new)\) with a short description.
<code-example format="shell" language="shell">
ng help
ng generate --help
ng --help
ng new --help
</code-example>
+23
View File
@@ -0,0 +1,23 @@
@name JSONP support in HttpClient configuration
@category runtime
@shortDescription Missing JSONP support in HttpClient configuration
@description
Angular produces this error when you attempt a `JSONP` request without providing the necessary support for it in the `HttpClient` configuration.
To enable `JSONP` support, you can do one of the following:
- add the `withJsonpSupport()` as an argument during the `provideHttpClient` function call (e.g. `provideHttpClient(withJsonpSupport())`) when `bootstrapApplication` is used
- import the `HttpClientJsonpModule` in your root AppModule, when NgModule-based bootstrap is used.
@debugging
Make sure that the JSONP support is added into your application either by calling the `withJsonpSupport()` function (when the `provideHttpClient()` is used) or importing the `HttpClientJsonpModule` module as described above.
See [Make a JSONP request](/guide/http-make-jsonp-request) for more info.
<!-- links -->
<!-- external links -->
<!-- end links -->
@reviewed 2023-05-02
+5 -1
View File
@@ -36,5 +36,9 @@ export class ExampleCmp {
@debugging
The error message in the developer console should contain information on a specific part of the application's DOM structure that is causing the problem. Review that part of the application for hydration-related errors, such as direct DOM manipulation using native APIs.
Check that your template has valid HTML structure. See more information in the [hydration guide](guide/hydration#valid-html-structure).
You can add the `ngSkipHydration` attribute to your component host node as a possible workaround.
If your application works in development environment, but you see hydration errors in production builds, make sure that the generated HTML that is delivered to a browser contains comment nodes produced by Angular during the rendering on the server. Those comment nodes are used by Angular runtime as anchors for view containers (with and without hydration) and hydration process expects them to be present at their original locations. If you have a custom logic to remove comment nodes from the HTML generated by the server-side rendering or you've configured your CDN to remove them before serving the content - disable the comment nodes removal and check if hydration errors are gone.
+26
View File
@@ -0,0 +1,26 @@
@name No hydration info in server response
@category runtime
@shortDescription No hydration info is present in server response.
@description
This error occurs when hydration is enabled on the client, but the server response
doesn't contain special serialized information about the application that hydration
logic relies on.
This can happen when the `provideClientHydration()` function is included in the client
part of the application configuration, but is missing in the server part of the configuration.
In applications with the default project structure (generated by the `ng new`),
the `provideClientHydration()` call is added either into the `providers` array of
the main `AppModule` (which is imported into the server module) or into a set of
providers that are included into both client and server configurations.
If you have a custom setup where client and server configuration are independent
and do not share common set of providers, make sure that the `provideClientHydration()`
is also included into the set of providers used to bootstrap an application on the server.
More information about hydration can be found in [this guide](guide/hydration).
@debugging
Verify that the `provideClientHydration()` call is included into a set of providers
that is used to bootstrap an application on the server.
+53
View File
@@ -0,0 +1,53 @@
@name NgZone remains unstable
@category runtime
@shortDescription NgZone remains unstable after a long period of time
@description
This warning occurs when hydration is enabled on the client but the NgZone remains unstable for a long period of time.
The {@link ApplicationRef#isStable} API uses NgZone to report when an application becomes `stable` and `unstable`. An application is considered stable when there are no pending microtasks or macrotasks.
Angular Hydration relies on a signal from Zone.js when it becomes stable inside an application:
* during the server-side rendering (SSR) to start the serialization process
* in a browser this signal is used to start the post-hydration cleanup to remove DOM nodes that remained unclaimed
This warning is displayed when the `ApplicationRef.isStable()` doesn't emit `true` within 10 seconds. If this is intentional and your application becomes stable later, you can ignore this warning.
**Macrotasks**
Macrotasks include functions like `setInterval`, `setTimeout`, `requestAnimationFrame` etc.
If one of these functions is called in the initialization phase of the app or the bootstrapped components, the application will remain unstable.
```typescript
@Component({
standalone: true,
selector: 'app',
template: ``,
})
class SimpleComponent {
constructor() {
setInterval(() => { ... }, 1000)
// or
setTimeout(() => { ... }, 10_000)
}
}
```
If these functions need to be called in the initialization phase, invoking them outside the angular zone solves the issue.
```typescript
class SimpleComponent {
constructor() {
inject(NgZone).runOutsideAngular(() => {
setInterval(() => {}, 1000);
})
}
}
```
@debugging
Verify that you don't have any long standing microtask or macrotasks.
+65
View File
@@ -0,0 +1,65 @@
@name Component ID generation collision
@category runtime
@shortDescription Component ID generation collision detected
@description
When creating components, Angular generates a unique component ID for each component. This is generated using the Angular component metadata, including but not limited: selectors, the number of host bindings, class property names, view and content queries. When two components metadata are identical (often times sharing the same selector), an ID generation collision will occur.
Component IDs are used in Angular internally:
- for extra annotations of DOM nodes for style encapsulation
- during [hydration](guide/hydration) to restore an application state after [server-side rendering](guide/universal).
To avoid issues that might be caused by the component ID collision, it's recommended to resolve them as described below.
** Example of a Component ID collision **
```typescript
@Component({
selector: 'my-component',
template: 'complex-template',
})
class SomeComponent {}
@Component({
selector: 'my-component',
template: 'empty-template',
})
class SomeMockedComponent {}
```
Having these two components defined will trigger an ID generation collision and during development a warning will be displayed.
@debugging
The warning message includes the class name of the two components whose IDs are colliding.
The problem can be resolved using one of the solutions below:
1. Change the selector of one of the two components. For example by using a pseudo-selector with no effect like `:not()` and a different tag name.
```typescript
@Component({
selector: 'my-component:not(p)',
template: 'empty-template',
})
class SomeMockedComponent {}
```
2. Add an extra host attribute to one of the components.
```typescript
@Component({
selector: 'my-component',
template: 'complex-template',
host: {'some-binding': 'some-value'},
})
class SomeComponent {}
```
<!-- links -->
<!-- external links -->
<!-- end links -->
@reviewed 2023-04-25
+14
View File
@@ -0,0 +1,14 @@
@name Hydration with unsupported Zone.js instance.
@category runtime
@shortDescription Hydration was enabled with unsupported Zone.js instance.
@description
This warning means that the hydration was enabled for an application that was configured to use an unsupported version of Zone.js: either a custom or a "noop" one (see more info [here](api/core/BootstrapOptions#ngZone)).
Hydration relies on a signal from Zone.js when it becomes stable inside an application, so that Angular can start the serialization process on the server or post-hydration cleanup on the client (to remove DOM nodes that remained unclaimed).
Providing a custom or a "noop" Zone.js implementation may lead to a different timing of the "stable" event, thus triggering the serialization or the cleanup too early or too late. This is not yet a fully supported configuration.
If you use a custom Zone.js implementation, make sure that the "onStable" event is emitted at the right time and does not result in incorrect application behavior with hydration.
More information about hydration can be found in the [hydration guide](guide/hydration).
@@ -150,14 +150,14 @@
<h4 id="ngFor-index">*ngFor with index</h4>
<p>with <i>semi-colon</i> separator</p>
<p>with <em>semi-colon</em> separator</p>
<div class="box">
<!-- #docregion NgFor-3 -->
<div *ngFor="let item of items; let i=index">{{i + 1}} - {{item.name}}</div>
<!-- #enddocregion NgFor-3 -->
</div>
<p>with <i>comma</i> separator</p>
<p>with <em>comma</em> separator</p>
<div class="box">
<div *ngFor="let item of items, let i=index">{{i + 1}} - {{item.name}}</div>
</div>
@@ -167,7 +167,7 @@
<button type="button" (click)="changeIds()">Change ids</button>
<button type="button" (click)="clearTrackByCounts()">Clear counts</button>
<p><i>without</i> trackBy</p>
<p><em>without</em> trackBy</p>
<div class="box">
<div #noTrackBy *ngFor="let item of items">({{item.id}}) {{item.name}}</div>
@@ -187,7 +187,7 @@
<br><br><br>
<p>with trackBy and <i>semi-colon</i> separator</p>
<p>with trackBy and <em>semi-colon</em> separator</p>
<div class="box">
<!-- #docregion trackBy -->
<div *ngFor="let item of items; trackBy: trackByItems">
@@ -196,17 +196,17 @@
<!-- #enddocregion trackBy -->
</div>
<p>with trackBy and <i>comma</i> separator</p>
<p>with trackBy and <em>comma</em> separator</p>
<div class="box">
<div *ngFor="let item of items, trackBy: trackByItems">({{item.id}}) {{item.name}}</div>
</div>
<p>with trackBy and <i>space</i> separator</p>
<p>with trackBy and <em>space</em> separator</p>
<div class="box">
<div *ngFor="let item of items trackBy: trackByItems">({{item.id}}) {{item.name}}</div>
</div>
<p>with <i>generic</i> trackById function</p>
<p>with <em>generic</em> trackById function</p>
<div class="box">
<div *ngFor="let item of items, trackBy: trackById">({{item.id}}) {{item.name}}</div>
</div>
@@ -2,10 +2,10 @@
<a href="#parent-to-child">Pass data from parent to child with input binding ("Heroes")</a><br/>
<a href="#parent-to-child-setter">Intercept input property changes with a setter ("Master")</a><br/>
<a href="#parent-to-child-on-changes">Intercept input property changes with <i>ngOnChanges</i> ("Source code version")</a><br/>
<a href="#parent-to-child-on-changes">Intercept input property changes with <em>ngOnChanges</em> ("Source code version")</a><br/>
<a href="#child-to-parent">Parent listens for child event ("Colonize Universe")</a><br/>
<a href="#parent-to-child-local-var">Parent to child via <i>local variable</i>("Countdown to Liftoff")</a><br/>
<a href="#parent-to-view-child">Parent calls <i>ViewChild</i>("Countdown to Liftoff")</a><br/>
<a href="#parent-to-child-local-var">Parent to child via <em>local variable</em>("Countdown to Liftoff")</a><br/>
<a href="#parent-to-view-child">Parent calls <em>ViewChild</em>("Countdown to Liftoff")</a><br/>
<a href="#bidirectional-service">Parent and children communicate via a service ("Mission Control")</a><br/>
<div id="parent-to-child">
@@ -6,24 +6,22 @@ import { Component, OnDestroy } from '@angular/core';
template: '<p>{{message}}</p>'
})
export class CountdownTimerComponent implements OnDestroy {
intervalId = 0;
message = '';
seconds = 11;
ngOnDestroy() { this.clearTimer(); }
ngOnDestroy() { this.clearTimer?.(); }
start() { this.countDown(); }
stop() {
this.clearTimer();
this.clearTimer?.();
this.message = `Holding at T-${this.seconds} seconds`;
}
private clearTimer() { clearInterval(this.intervalId); }
private clearTimer: VoidFunction | undefined;
private countDown() {
this.clearTimer();
this.intervalId = window.setInterval(() => {
this.clearTimer?.();
const interval = setInterval(() => {
this.seconds -= 1;
if (this.seconds === 0) {
this.message = 'Blast off!';
@@ -32,5 +30,6 @@ export class CountdownTimerComponent implements OnDestroy {
this.message = `T-${this.seconds} seconds and counting`;
}
}, 1000);
this.clearTimer = () => clearInterval(interval);
}
}
@@ -23,7 +23,8 @@ export class AdBannerComponent implements OnInit, OnDestroy {
currentAdIndex = -1;
@ViewChild(AdDirective, {static: true}) adHost!: AdDirective;
interval: number|undefined;
private clearTimer: VoidFunction | undefined;
ngOnInit(): void {
this.loadComponent();
@@ -31,7 +32,7 @@ export class AdBannerComponent implements OnInit, OnDestroy {
}
ngOnDestroy() {
clearInterval(this.interval);
this.clearTimer?.();
}
loadComponent() {
@@ -46,9 +47,10 @@ export class AdBannerComponent implements OnInit, OnDestroy {
}
getAds() {
this.interval = setInterval(() => {
const interval = setInterval(() => {
this.loadComponent();
}, 3000);
this.clearTimer = () => clearInterval(interval);
}
}
// #enddocregion class
+2
View File
@@ -43,6 +43,7 @@ EXAMPLES = {
"elements": {"stackblitz": True, "zip": True},
"event-binding": {"stackblitz": True, "zip": True},
"feature-modules": {"stackblitz": True, "zip": True},
"first-app-lesson-00": {"stackblitz": True, "zip": True},
"first-app-lesson-01": {"stackblitz": True, "zip": True},
"first-app-lesson-02": {"stackblitz": True, "zip": True},
"first-app-lesson-03": {"stackblitz": True, "zip": True},
@@ -56,6 +57,7 @@ EXAMPLES = {
"first-app-lesson-11": {"stackblitz": True, "zip": True},
"first-app-lesson-12": {"stackblitz": True, "zip": True},
"first-app-lesson-13": {"stackblitz": True, "zip": True},
"first-app-lesson-14": {"stackblitz": True, "zip": True},
"form-validation": {"stackblitz": True, "zip": True},
"forms": {"stackblitz": True, "zip": True},
"forms-overview": {"stackblitz": True, "zip": True},
@@ -0,0 +1,11 @@
load("//aio/content/examples:examples.bzl", "docs_example")
load("@aio_npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK")
package(default_visibility = ["//visibility:public"])
docs_example(
name = "first-app-lesson-00",
# This example downloads fonts and images from googleapis.com
test_exec_properties = ENABLE_NETWORK,
test_tags = ["requires-network"],
)
@@ -0,0 +1,18 @@
import { browser, element, by, logging } from 'protractor';
describe('first-app-lesson-00 app', () => {
beforeEach(() => browser.get(''));
it('should display correct title', async () => {
expect(await element.all(by.css('h1')).get(0).getText()).toEqual('Default');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
@@ -0,0 +1,6 @@
{
"useCommonBoilerplate": false,
"overrideBoilerplate": [
"src/styles.css"
]
}
@@ -0,0 +1,12 @@
:host {
--content-padding: 10px;
}
header {
display: block;
height: 60px;
padding: var(--content-padding);
box-shadow: 0px 5px 25px var(--shadow-color);
}
.content {
padding: var(--content-padding);
}
@@ -0,0 +1,12 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
standalone: true,
imports: [],
template: `<h1>Default</h1>`,
styleUrls: ['./app.component.css'],
})
export class AppComponent {
title = 'default';
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20pt" height="20pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<path d="m50 11.602c-15.398 0-27.898 12.5-27.898 27.898 0 5 1.3008 9.6992 3.6016 13.801l2.8984 4.1992 21.398 30.898 21.801-31.398 2.1992-3.1992c2.5-4.1992 3.8984-9 3.8984-14.199 0-15.5-12.5-28-27.898-28zm0 35.598c-4.1992 0-7.6992-3.3984-7.6992-7.6992s3.3984-7.6992 7.6992-7.6992 7.6992 3.3984 7.6992 7.6992-3.5 7.6992-7.6992 7.6992z" fill="#605cc8"/>
</svg>

After

Width:  |  Height:  |  Size: 502 B

@@ -0,0 +1,7 @@
<svg width="151" height="44" viewBox="0 0 151 44" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.15532 33.2946C5.25369 33.2946 4.58006 32.5707 4.58006 31.6701V24.0152C4.58006 19.5469 4.35206 20.6276 7.59585 17.4236C21.7317 4.06732 16.2425 4.24744 29.6149 18.054C32.0434 20.7627 31.9985 19.4534 31.9985 23.8316V31.6667C31.9985 32.5707 31.28 33.2912 30.3749 33.2912H6.15532V33.2946Z" fill="#605DC8"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M30.896 35.1547L5.73676 35.2586C4.80059 35.2621 3.75042 35.8232 3.37388 36.5229L2.90061 37.4027L0.537726 41.7878L0.140457 42.529C-0.236085 43.2253 0.164639 43.7829 1.10081 43.7795L26.26 43.6756C27.1962 43.6721 28.2464 43.111 28.6229 42.4113L29.0962 41.5315L31.4591 37.1463L31.8563 36.4051C32.2329 35.7089 31.8321 35.1512 30.896 35.1547Z" fill="#605DC8"/>
<path d="M2.54861 18.7156C2.23079 18.7156 1.90952 18.629 1.6228 18.4454C0.821352 17.9363 0.5899 16.859 1.09771 16.0554C1.46389 15.4701 2.70061 14.2231 5.50912 11.4659L6.39693 10.5931C8.73218 8.38318 10.5147 6.56817 11.9449 5.10646C15.1679 1.81587 16.7985 0.153263 18.9023 0.222538C20.9888 0.277958 22.4362 1.92325 25.3138 5.19651C26.7267 6.8037 28.4816 8.8023 30.8514 11.2477C30.8652 11.265 30.8825 11.2789 30.8963 11.2962C31.228 11.6634 31.715 12.2003 32.2401 12.7752C33.9743 14.6734 34.8206 15.6086 35.0763 15.9688C35.629 16.7413 35.4494 17.8185 34.679 18.3727C33.9087 18.9234 32.8343 18.7468 32.2816 17.9744C32.0639 17.6869 30.5889 16.0693 29.708 15.1064C29.1863 14.5348 28.6993 14.0014 28.3642 13.6308C25.9495 11.1369 24.1704 9.11057 22.7368 7.4826C21.0233 5.5325 19.4032 3.68977 18.809 3.67245H18.8021C18.1699 3.67245 16.3356 5.54289 14.3976 7.52417C12.9467 9.00666 11.14 10.8494 8.78054 13.0766L7.91001 13.9321C6.74929 15.0717 4.33804 17.4375 3.97877 17.9293C3.65405 18.4454 3.10824 18.7225 2.54515 18.7225L2.54861 18.7156Z" fill="#605DC8"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.0976 33.2115V26.0588C22.0976 25.4665 21.6174 24.985 21.0267 24.985H15.1955C14.6047 24.985 14.1246 25.4665 14.1246 26.0588V33.2115C14.1246 33.2704 14.1142 33.3293 14.0969 33.3847H22.1252C22.1079 33.3293 22.0976 33.2739 22.0976 33.2115Z" fill="white"/>
<path d="M58.9784 10.0512V32.2205H54.5319V22.7874H45.0353V32.2205H40.5887V10.0512H45.0353V19.1666H54.5319V10.0512H58.9784ZM70.8506 32.5063C69.1567 32.5063 67.6322 32.1358 66.277 31.3947C64.9219 30.6324 63.8526 29.5631 63.0692 28.1868C62.3069 26.8105 61.9258 25.2224 61.9258 23.4226C61.9258 21.6228 62.3175 20.0348 63.1009 18.6585C63.9055 17.2821 64.996 16.2234 66.3723 15.4823C67.7486 14.7201 69.2838 14.3389 70.9777 14.3389C72.6716 14.3389 74.2067 14.7201 75.5831 15.4823C76.9594 16.2234 78.0393 17.2821 78.8227 18.6585C79.6273 20.0348 80.0296 21.6228 80.0296 23.4226C80.0296 25.2224 79.6167 26.8105 78.7909 28.1868C77.9863 29.5631 76.8853 30.6324 75.4878 31.3947C74.1115 32.1358 72.5657 32.5063 70.8506 32.5063ZM70.8506 28.6315C71.6553 28.6315 72.4069 28.4409 73.1057 28.0597C73.8256 27.6574 74.3973 27.0646 74.8208 26.2811C75.2443 25.4977 75.456 24.5449 75.456 23.4226C75.456 21.7499 75.0114 20.4688 74.122 19.5795C73.2539 18.669 72.1846 18.2138 70.9142 18.2138C69.6437 18.2138 68.5744 18.669 67.7063 19.5795C66.8593 20.4688 66.4358 21.7499 66.4358 23.4226C66.4358 25.0954 66.8487 26.387 67.6745 27.2975C68.5215 28.1868 69.5802 28.6315 70.8506 28.6315ZM104.825 14.3707C106.985 14.3707 108.721 15.0377 110.034 16.3717C111.368 17.6844 112.035 19.5266 112.035 21.8981V32.2205H107.589V22.5016C107.589 21.1252 107.239 20.0771 106.54 19.3572C105.842 18.6161 104.889 18.2456 103.682 18.2456C102.475 18.2456 101.512 18.6161 100.792 19.3572C100.093 20.0771 99.7436 21.1252 99.7436 22.5016V32.2205H95.297V22.5016C95.297 21.1252 94.9477 20.0771 94.2489 19.3572C93.5502 18.6161 92.5974 18.2456 91.3904 18.2456C90.1623 18.2456 89.1883 18.6161 88.4684 19.3572C87.7697 20.0771 87.4203 21.1252 87.4203 22.5016V32.2205H82.9737V14.6248H87.4203V16.7528C87.992 16.0117 88.7225 15.4294 89.6118 15.0059C90.5223 14.5824 91.5175 14.3707 92.5974 14.3707C93.9737 14.3707 95.2018 14.6671 96.2816 15.26C97.3615 15.8317 98.1979 16.6575 98.7908 17.7374C99.3625 16.721 100.188 15.9058 101.268 15.2918C102.369 14.6777 103.555 14.3707 104.825 14.3707ZM132.294 23.0415C132.294 23.6767 132.252 24.2484 132.167 24.7566H119.304C119.41 26.027 119.854 27.0222 120.638 27.7421C121.421 28.4621 122.385 28.822 123.528 28.822C125.18 28.822 126.355 28.1127 127.053 26.694H131.849C131.341 28.3879 130.367 29.7854 128.927 30.8865C127.488 31.9664 125.72 32.5063 123.623 32.5063C121.929 32.5063 120.405 32.1358 119.05 31.3947C117.716 30.6324 116.668 29.5631 115.905 28.1868C115.164 26.8105 114.794 25.2224 114.794 23.4226C114.794 21.6017 115.164 20.003 115.905 18.6267C116.646 17.2504 117.684 16.1917 119.018 15.4506C120.352 14.7095 121.887 14.3389 123.623 14.3389C125.296 14.3389 126.789 14.6989 128.102 15.4188C129.436 16.1387 130.462 17.1657 131.182 18.4996C131.924 19.8124 132.294 21.3264 132.294 23.0415ZM127.689 21.771C127.668 20.6276 127.255 19.7172 126.45 19.0396C125.645 18.3408 124.661 17.9915 123.496 17.9915C122.395 17.9915 121.464 18.3303 120.701 19.0078C119.96 19.6642 119.505 20.5853 119.336 21.771H127.689ZM141.955 32.5063C140.516 32.5063 139.224 32.2522 138.081 31.744C136.937 31.2147 136.027 30.5054 135.349 29.616C134.693 28.7267 134.333 27.7421 134.269 26.6623H138.748C138.832 27.3398 139.16 27.9009 139.732 28.3456C140.325 28.7903 141.055 29.0126 141.924 29.0126C142.771 29.0126 143.427 28.8432 143.893 28.5044C144.38 28.1656 144.623 27.7316 144.623 27.2022C144.623 26.6305 144.327 26.207 143.734 25.9318C143.162 25.6353 142.241 25.3177 140.971 24.9789C139.658 24.6613 138.578 24.3331 137.731 23.9943C136.905 23.6555 136.185 23.1368 135.571 22.438C134.979 21.7393 134.682 20.797 134.682 19.6113C134.682 18.6373 134.957 17.748 135.508 16.9434C136.08 16.1387 136.884 15.5035 137.922 15.0377C138.98 14.5719 140.219 14.3389 141.638 14.3389C143.734 14.3389 145.407 14.8683 146.656 15.927C147.905 16.9645 148.593 18.3726 148.721 20.1512H144.465C144.401 19.4525 144.105 18.902 143.575 18.4996C143.067 18.0762 142.379 17.8644 141.511 17.8644C140.706 17.8644 140.081 18.0126 139.637 18.3091C139.213 18.6055 139.002 19.0184 139.002 19.5478C139.002 20.1406 139.298 20.5959 139.891 20.9135C140.484 21.2099 141.405 21.517 142.654 21.8346C143.925 22.1522 144.973 22.4804 145.798 22.8192C146.624 23.1579 147.334 23.6873 147.926 24.4072C148.541 25.106 148.858 26.0376 148.879 27.2022C148.879 28.2186 148.593 29.129 148.022 29.9337C147.471 30.7383 146.667 31.3735 145.608 31.8393C144.57 32.284 143.353 32.5063 141.955 32.5063Z" fill="#605DC8"/>
</svg>

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 B

@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Default</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
</head>
<body>
<app-root></app-root>
</body>
</html>
@@ -0,0 +1,10 @@
/*
* Protractor support is deprecated in Angular.
* Protractor is used in this example for compatibility with Angular documentation tools.
*/
import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser';
import { AppComponent } from './app/app.component';
bootstrapApplication(AppComponent,
{providers: [provideProtractorTestingSupport()]})
.catch(err => console.error(err));
@@ -0,0 +1,23 @@
/* You can add global styles to this file, and also import other style files */
* {
margin: 0;
padding: 0;
}
body {
font-family: 'Be Vietnam Pro', sans-serif;
}
:root {
--primary-color: #605DC8;
--secondary-color: #8B89E6;
--accent-color: #e8e7fa;
--shadow-color: #E8E8E8;
}
button.primary {
padding: 10px;
border: solid 1px var(--primary-color);
background: var(--primary-color);
color: white;
border-radius: 8px;
}
@@ -0,0 +1,17 @@
{
"description": "Angular - First App - Lesson 00",
"files": [
"!**/*.d.ts",
"!**/*.js",
"!**/*.[1,2].*"
],
"tags": [
[
"first",
"angular",
"app",
"lesson",
"00"
]
]
}
@@ -4,9 +4,13 @@ import { Component } from '@angular/core';
selector: 'app-root',
standalone: true,
imports: [],
// #docregion app-comp-template
template: `<h1>Hello world!</h1>`,
// #enddocregion
styleUrls: ['./app.component.css'],
})
export class AppComponent {
// #docregion app-comp-title
title = 'homes';
// #enddocregion
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

@@ -2,7 +2,9 @@
<html lang="en">
<head>
<meta charset="utf-8">
<!-- #docregion app-title -->
<title>Homes</title>
<!-- #enddocregion -->
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
@@ -1,12 +1,17 @@
import { Component } from '@angular/core';
// #docregion import-home
import { HomeComponent } from './home/home.component';
// #enddocregion
@Component({
selector: 'app-root',
standalone: true,
// #docregion app-metadata-imports
imports: [
HomeComponent,
],
// #enddocregion
// #docregion app-metadata-template
template: `
<main>
<header class="brand-name">
@@ -17,6 +22,7 @@ import { HomeComponent } from './home/home.component';
</section>
</main>
`,
// #enddocregion
styleUrls: ['./app.component.css'],
})
export class AppComponent {
@@ -2,11 +2,12 @@
display: grid;
column-gap: 14px;
row-gap: 14px;
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(auto-fill, minmax(400px, 400px));
margin-top: 50px;
justify-content: space-around;
}
input[type='text'] {
input[type="text"] {
border: solid 1px var(--primary-color);
padding: 10px;
border-radius: 8px;
@@ -27,13 +28,13 @@ button {
.results {
grid-template-columns: repeat(2, 1fr);
}
input[type='text'] {
input[type="text"] {
width: 70%;
}
}
}
@media (max-width: 499px) {
.results {
grid-template-columns: 1fr;
}
}
}
@@ -7,6 +7,7 @@ import { CommonModule } from '@angular/common';
imports: [
CommonModule,
],
// #docregion home-template
template: `
<section>
<form>
@@ -15,6 +16,7 @@ import { CommonModule } from '@angular/common';
</form>
</section>
`,
// #enddocregion
styleUrls: ['./home.component.css'],
})
Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

@@ -2,11 +2,12 @@
display: grid;
column-gap: 14px;
row-gap: 14px;
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(auto-fill, minmax(400px, 400px));
margin-top: 50px;
justify-content: space-around;
}
input[type='text'] {
input[type="text"] {
border: solid 1px var(--primary-color);
padding: 10px;
border-radius: 8px;
@@ -27,13 +28,13 @@ button {
.results {
grid-template-columns: repeat(2, 1fr);
}
input[type='text'] {
input[type="text"] {
width: 70%;
}
}
}
@media (max-width: 499px) {
.results {
grid-template-columns: 1fr;
}
}
}
@@ -1,14 +1,18 @@
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
// #docregion import-housingLocation
import { HousingLocationComponent } from '../housing-location/housing-location.component';
// #enddocregion
@Component({
selector: 'app-home',
standalone: true,
// #docregion add-housingLocation-to-array
imports: [
CommonModule,
HousingLocationComponent
],
// #enddocregion
// #docregion add-housingLocation-to-template
template: `
<section>
<form>
@@ -19,7 +23,8 @@ import { HousingLocationComponent } from '../housing-location/housing-location.c
<section class="results">
<app-housing-location></app-housing-location>
</section>
`,
`,
// #enddocregion
styleUrls: ['./home.component.css'],
})
@@ -5,7 +5,7 @@
}
.listing-heading {
color: var(--primary-color);
padding: 10px 10px 0 10px;
padding: 10px 20px 0 20px;
}
.listing-photo {
height: 250px;
@@ -14,18 +14,18 @@
border-radius: 30px 30px 0 0;
}
.listing-location {
padding: 10px 10px 20px 10px;
padding: 10px 20px 20px 20px;
}
.listing-location::before {
content: url('/assets/location-pin.svg') / '';
content: url("/assets/location-pin.svg") / "";
}
section.listing a {
padding-left: 10px;
padding-left: 20px;
text-decoration: none;
color: var(--primary-color);
}
section.listing a::after {
content: '\203A';
content: "\203A";
margin-left: 5px;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Some files were not shown because too many files have changed in this diff Show More