Commit Graph

27506 Commits

Author SHA1 Message Date
Alex Rickabaugh 72b4ff4b9e fix(common): untrack subscription and unsubscription in async pipe (#50522)
This commit wraps the actual subscription/unsubscription in the `async`
pipe with `untracked`, to ensure that any signal reads/writes which might
take place in `Observable` side effects are not attributed to the template.

Fixes #50382

PR Close #50522
2023-05-31 12:38:30 -07:00
Arno Chauveau 915abc6f35 docs(router): correct references to guard services (#50514)
PR Close #50514
2023-05-31 12:37:19 -07:00
gdarnell ac447ede22 refactor(common): fix variable name (#50521)
The PreloadLinkCreator instance was assigned to a variable named preloadLinkChecker, which is confusing because PreloadLinkChecker is also a thing.

PR Close #50521
2023-05-31 12:36:49 -07:00
Angular Robot 7ca301acd5 build: update dependency eslint-plugin-jsdoc to v45 (#50523)
See associated pull request for more information.

PR Close #50523
2023-05-31 12:34:26 -07:00
Jessica Janiuk 7567348c54 Revert "fix(zone.js): enable monkey patching of the queueMicrotask() API in node.js (#50467)" (#50529)
This reverts commit 381cb98226.

PR Close #50529
2023-05-31 09:57:42 -07:00
Jessica Janiuk 069498ca89 build: Fix size tracking test (#50531)
One of our goldens needed to be bumped.

PR Close #50531
2023-05-31 14:43:52 +00:00
Matthieu Riegler 0c441f6d64 refactor(platform-browser): Remove BrowserDetection (#50411)
Our tests should rely on the running browser.

PR Close #50411
2023-05-30 13:06:28 -07:00
Matthieu Riegler 8a30faf08c docs: Adding myself to the collaborators (#50494)
Let's continue building Angular ! =)

PR Close #50494
2023-05-30 13:05:55 -07:00
Paul Gschwendtner ea00ab86e0 build: remove console output from locale build action (#50426)
Bazel build actions should never print something to the console
on success as this would pollute the overall action output.

PR Close #50426
2023-05-30 13:05:18 -07:00
Paul Gschwendtner 074abad64c build: speed up locale file generation to improve DX (#50426)
Before this commit, building everything to run `@angular/core` tests:
```
INFO: Elapsed time: 76.496s, Critical Path: 72.92s
INFO: 225 processes: 125 internal, 5 linux-sandbox, 2 local, 93 worker.
INFO: Build completed successfully, 225 total actions
```

After:
```
Use --sandbox_debug to see verbose messages from the sandbox
INFO: Elapsed time: 15.952s, Critical Path: 10.75s
INFO: 200 processes: 128 internal, 4 linux-sandbox, 2 local, 66 worker.
```

This being on a specialist Cloudtop.

PR Close #50426
2023-05-30 13:05:18 -07:00
Angular Robot f5b82b54b6 build: update github/codeql-action action to v2.3.5 (#50508)
See associated pull request for more information.

PR Close #50508
2023-05-30 13:04:42 -07:00
Ady Ngom 5abe0c513b docs: add Ady Ngom to GDE resources (#49759)
[x] The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit
[] Tests for the changes have been added (for bug fixes / features)
[] Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce?

[] Bugfix
[] Feature
[] Code style update (formatting, local variables)
[] Refactoring (no functional changes, no api changes)
[] Build related changes
[] CI related changes
[] Documentation content changes
[x] angular.io application / infrastructure changes
[] Other... Please describe:

[] Yes
[x] No

Based on information provided [here](https://github.com/WebGDEProgram/main/tree/master/Angular)

PR Close #49759
2023-05-30 13:02:22 -07:00
Angular Robot ad3197e96a build: update all non-major dependencies (#50417)
See associated pull request for more information.

PR Close #50417
2023-05-30 13:01:50 -07:00
Kristiyan Kostadinov 68017d4e75 feat(core): add ability to transform input values (#50420)
According to the HTML specification most attributes are defined as strings, however some can be interpreted as different types like booleans or numbers. [In the HTML standard](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes), boolean attributes are considered `true` if they are present on a DOM node and `false` if they are omitted. Common examples of boolean attributes are `disabled` on interactive elements like `<button>` or `checked` on `<input type="checkbox">`. Another example of an attribute that is defined as a string, but interpreted as a different type is the `value` attribute of `<input type="number">` which logs a warning and ignores the value if it can't be parsed as a number.

Historically, authoring Angular inputs that match the native behavior in a type-safe way has been difficult for developers, because Angular interprets all static attributes as strings. While some recent TypeScript versions made this easier by allowing setters and getters to have different types, supporting this pattern still requires a lot of boilerplate and additional properties to be declared. For example, currently developers have to write something like this to have a `disabled` input that behaves like the native one:

```typescript
import {Directive, Input} from '@angular/core';

@Directive({selector: 'mat-checkbox'})
export class MatCheckbox {
  @Input()
  get disabled() {
    return this._disabled;
  }
  set disabled(value: any) {
    this._disabled = typeof value === 'boolean' ? value : (value != null && value !== 'false');
  }
  private _disabled = false;
}
```

This feature aims to address the issue by introducing a `transform` property on inputs. If an input has a `transform` function, any values set through the template will be passed through the function before being assigned to the directive instance. The example from above can be rewritten to the following:

```typescript
import {Directive, Input, booleanAttribute} from '@angular/core';

@Directive({selector: 'mat-checkbox'})
export class MatCheckbox {
  @Input({transform: booleanAttribute}) disabled: boolean = false;
}
```

These changes also add the `booleanAttribute` and `numberAttribute` utilities to `@angular/core` since they're common enough to be useful for most projects.

Fixes #8968.
Fixes #14761.

PR Close #50420
2023-05-30 13:01:13 -07:00
alkavats1 25b6b9788d docs: improved code quality (#50443)
PR Close #50443
2023-05-30 13:00:39 -07:00
alkavats1 178ece4dfb docs: correcting existing import for the commonHttpTesting (#50473)
PR Close #50473
2023-05-30 12:59:53 -07:00
alkavats1 d856be0314 docs: removed the obsolete frameborder Tag and updated the files with using css (#50480)
PR Close #50480
2023-05-30 12:59:26 -07:00
Matthieu Riegler 1ca6362c06 docs(docs-infra): rimraf requires the globflag. (#50493)
On windows rimraf requires since v4 the glob flag to support wildcards in path.

fixes #49806

PR Close #50493
2023-05-30 12:58:52 -07:00
Alan Agius 0c80349cf6 refactor(http): replace zone.js macrotask creation with InitialRenderPendingTasks (#50425)
This commits refactors the HTTP client to use `InitialRenderPendingTasks` instead of Zone.js macrotask. This is another approach to https://github.com/angular/angular/pull/50406 which was revert due to a failure in G3.

PR Close #50425
2023-05-30 12:58:22 -07:00
Alan Agius 28c68f709c fix(core): update ApplicationRef.isStable to account for rendering pending tasks (#50425)
This commit updates the `ApplicationRef.isStable` API to account for
pending rendering task. This is needed as once a pending rendering task
is done, new macrotask and microtask could be created which previously caused these not
to be intercepted and thus ignored when doing SSR.

PR Close #50425
2023-05-30 12:58:22 -07:00
Alan Agius 381cb98226 fix(zone.js): enable monkey patching of the queueMicrotask() API in node.js (#50467)
Similar to the browser, now we also monkey patch `queueMicrotask` in Node.js. This API was added in Node.js 11.

PR Close #50467
2023-05-30 12:57:45 -07:00
alkavats1 5576b9a5ea docs: removed the unused import and update the obsolete tag of width in table tag (#50474)
PR Close #50474
2023-05-30 09:23:06 -07:00
Asheer Rizvi 019eaf6831 docs: corrected method name for "Tap into the Observable" section (#50479)
At this point in the tutorial we are still talking about the `getHeroes()` method. Corrected the method name to reflect that since the final piece of code within this section is for `getHeroes()`
PR Close #50479
2023-05-30 09:22:36 -07:00
alkavats1 9acc0e32c4 docs: refactored the markup tags (#50481)
PR Close #50481
2023-05-30 09:21:58 -07:00
alkavats1 7d8ebfc949 docs: updated the deprecated tag of width in table tag (#50487)
PR Close #50487
2023-05-30 09:21:27 -07:00
Alan Agius 62e76d4d20 docs: update CLI command to include --preserve-symlinks-main (#50512)
This is needed to instructs the module loader to preserve symbolic links when resolving and caching the main module.

More information about this flag can be found: https://nodejs.org/api/cli.html#--preserve-symlinks-main

Closes: #50515

PR Close #50512
2023-05-30 09:20:53 -07:00
Alan Agius f414e26521 docs: remove outdated command to run Angular CLI when using ng-dev misc build-and-link (#50512)
Setting `BAZEL_TARGET="1"` is no longer needed as NGCC has been removed.

PR Close #50512
2023-05-30 09:20:53 -07:00
Dylan Hunn 6f5dabe0d2 Revert "fix(http): create macrotask during request handling instead of load start (#50406)" (#50475)
This reverts commit 2cdb4c5911.

PR Close #50475
2023-05-25 16:24:39 -04:00
Matthieu Riegler bada9199f5 fix(animations): Trigger leave animation when ViewContainerRef is injected (#48705)
Injecting `ViewContainerRef` into a component makes it effectively a container. The leave animation wasn't triggered on containers before this fix.

fixes angular#48667

PR Close #48705
2023-05-25 14:40:34 -04:00
Andrew Kushnir 3a05e4cca1 refactor(platform-server): exclude provideHttpClient() call from provideServerRendering() (#50459)
Previously, we've used to have server-specific logic for HttpClient, so there was a need to re-provide it with the right config. Since v16, that logic was refactored and there is no need to re-provide HttpClient anymore. The code in the `provideServerRendering()` was retained for historical reasons and it makes application configuration more difficult, because it forces developers to copy HttpClient config into server config as well (otherwise it would not be take into account).

This commit removes the `provideHttpClient()` call from the `provideServerRendering()` function. This is **not** a breaking change, since we've also merge browser application config in the `app.config.server.ts`, so if an application is configured to use HttpClient, it will continue to work on both client and server sides.

Resolves #50454.

PR Close #50459
2023-05-25 14:41:34 +00:00
Angular Robot 04553b9016 build: update dependency https-proxy-agent to v7 (#50456)
See associated pull request for more information.

PR Close #50456
2023-05-25 14:40:05 +00:00
Kristiyan Kostadinov 721bc72649 fix(compiler): resolve deprecation warning with TypeScript 5.1 (#50460)
We have a code path that accesses the `originalKeywordKind` property which logs a deprecation warning in version 5.1, but isn't available in some of the earlier versions that we support. These changes add a compatibility layer that goes through the non-deprecated function, if it exists.

PR Close #50460
2023-05-25 14:39:27 +00:00
alkavats1 258c773188 docs: remove unused imports and improved the code (#50424)
PR Close #50424
2023-05-25 14:37:54 +00:00
Chellappan 4f5f4969c5 refactor(core): Remove unused import from the graph.ts (#50372)
This commit updates the code to remove unused import of the `throwInvalidWriteToSignalError` symbol.

PR Close #50372
2023-05-25 14:37:05 +00:00
Jessica Janiuk 06b498f67f release: cut the v16.1.0-next.2 release 16.1.0-next.2 2023-05-24 11:03:56 -07:00
Jessica Janiuk cbe27990c2 docs: release notes for the v16.0.3 release 2023-05-24 10:45:41 -07:00
Alan Agius 2cdb4c5911 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 75fdbcb8f2 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 5fd4bf6651 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 24f7c1dc61 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 1e10df1c20 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 2d411430e3 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 933e812d14 refactor(localize): run spell check on localize package (#50445)
Fix typo found in BUILD.bazel

PR Close #50445
2023-05-24 13:56:55 +00:00
BrianDGLS 19993a490c 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:55 +00:00
Luís Martins 4c01107c0d 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:14 +00:00
Jessica Janiuk 6ced5c8779 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 4dc528d402 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 f7b8fb3c97 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 6ea8e0df2a 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 0604285866 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:58 +00:00