https://github.com/angular/angular

sort by:
Revision Author Date Message Commit Date
93cc5b2 release: cut the v15.0.0-next.6 release 12 October 2022, 18:38:19 UTC
7ab0a26 build: update comp labels to be area instead (#47750) Updates all of the comp: * labels to area: * instead PR Close #47750 12 October 2022, 18:10:35 UTC
59dfb54 docs: release notes for the v14.2.6 release 12 October 2022, 17:53:59 UTC
510a295 build: update to the latest version of the feature triage action Update to the latest version of the feature triage action 12 October 2022, 17:34:28 UTC
c36f500 build: update labels to match standardized labels (#47747) Update labels as part of standardization PR Close #47747 12 October 2022, 17:02:39 UTC
38078e7 fix(compiler-cli): add missing period to error message (#47744) With this change we add a missing period to the error message. PR Close #47744 12 October 2022, 15:57:25 UTC
9483343 feat(common): Add fill mode to NgOptimizedImage (#47738) Add a new boolean attribute to NgOptimizedImage called `fill` which does the following: * Removes the requirement for height and width * Adds inline styling to cause the image to fill its containing element * Adds a default `sizes` value of `100vw` which will cause the image to have a responsive srcset automatically generated PR Close #47738 12 October 2022, 15:56:56 UTC
3a9c452 docs: add Joshua Morony to GDE resources (#47704) PR Close #47704 11 October 2022, 23:42:46 UTC
4de3573 build: update io_bazel_rules_sass digest to f6ceac7 (#47376) See associated pull request for more information. PR Close #47376 11 October 2022, 23:16:21 UTC
8921c12 build: update all non-major dependencies (#47551) See associated pull request for more information. PR Close #47551 11 October 2022, 23:14:51 UTC
e3fbeab build: update dependency @rollup/plugin-commonjs to v23 (#47711) See associated pull request for more information. PR Close #47711 11 October 2022, 23:09:06 UTC
547b45a docs: fix linter errors for what-is-angular.md (#47708) PR Close #47708 11 October 2022, 23:07:09 UTC
a910c83 build(devtools): migrate to manifest v3 (#47575) Previously we built DevTools for all browsers with version 2 of the manifest file format. This commit includes a number of refactors and API additions that will enable us to build DevTools with version 3 of the manifest file format. The manifest v3 build of Angular DevTools has been tested on Chrome, Edge, and Safari. Notably, the Firefox version of Angular DevTools remains as a manifest v2 build. Firefox does not yet support manifest v3 in it's latest stable release. When Firefox makes this transition, a follow up PR will update the Firefox manifest file to version 3. Because Firefox still needs v2, we need to keep some old v2 APIs around in our background page (service worker in v3) that will execute conditionally based on if the extension was built for v2 or v3. This is determined with the chrome.runtime.getManifest().manifest_version API. PR Close #47575 11 October 2022, 22:47:22 UTC
bbbd4c3 docs: fix linter errors for security.md (#47688) PR Close #47688 11 October 2022, 22:05:43 UTC
23c06ee docs: fix linter errors for workspace-config.md (#47709) PR Close #47709 11 October 2022, 21:59:00 UTC
5fbe40c docs: fix linter errors for property-binding-best-practices.md (#47686) PR Close #47686 11 October 2022, 21:19:18 UTC
83f3d04 docs: fix linter errors for property-binding.md (#47687) PR Close #47687 11 October 2022, 21:18:45 UTC
39b72e2 fix(compiler): update element schema (#47552) Updates the DOM element schema to add the `hgroup` element and to include some properties that weren't supported the last time the schema was updated. Fixes #47545. PR Close #47552 11 October 2022, 17:21:47 UTC
1b9fd46 feat(core): add support for Node.js version 18 (#47730) This change aligns with the supported Node.js versions of the Angular CLI. See: https://github.com/angular/angular-cli/pull/24026 BREAKING CHANGE: Angular no longer supports Node.js versions `14.[15-19].x` and `16.[10-12].x`. Current supported versions of Node.js are `14.20.x`, `16.13.x` and `18.10.x`. PR Close #47730 11 October 2022, 17:21:19 UTC
b618b5a fix(zone.js): cancel tasks only when they are scheduled or running (#46435) Currently, there's no check if the task (that is being canceled) has the right state. Only `scheduled` and `running` tasks can be canceled. If the task has a non-appropriate state, then an error will be thrown. Cancelation should not throw an error on an already canceled task, e.g. `clearTimeout` does not throw errors when it's called multiple times on the same timer. PR Close #45711 PR Close #46435 11 October 2022, 17:20:54 UTC
96b7fe9 fix(forms): call `setDisabledState` on `ControlValueAcessor` when control is enabled (#47576) Previously, `setDisabledState` was never called when attached if the control is enabled. This PR fixes the bug, and creates a configuration option to opt-out of the fix. Fixes #35309. BREAKING CHANGE: setDisabledState will always be called when a `ControlValueAccessor` is attached. You can opt-out with `FormsModule.withConfig` or `ReactiveFormsModule.withConfig`. PR Close #47576 11 October 2022, 16:03:01 UTC
1818c54 docs: fix linter errors in prerendering.md (#47724) PR Close #47724 11 October 2022, 15:59:24 UTC
a41ff94 docs(core): Improved README.md (#47700) PR Close #47700 11 October 2022, 15:58:38 UTC
1b602fa Revert "fix(compiler): update element schema" (#47726) This reverts commit 3c45f6f33e7a20c460d95203a562e0c056d3dbf7. PR Close #47726 11 October 2022, 00:56:04 UTC
ca2fa7a docs: add 0 to filename of runtime error guides (#47722) PR Close #47722 10 October 2022, 22:30:43 UTC
40aad83 ci: adjust workflow permissions for OpenSSF Scorecard results publishing (#47721) Version 2 of the `openssf/scorecard-action` GitHub action requires the `id-token: write` permission to publish results. PR Close #47721 10 October 2022, 22:29:01 UTC
bc54687 fix(compiler-cli): exclude abstract classes from `strictInjectionParameters` requirement (#44615) In AOT compilations, the `strictInjectionParameters` compiler option can be enabled to report errors when an `@Injectable` annotated class has a constructor with parameters that do not provide an injection token, e.g. only a primitive type or interface. Since Ivy it's become required that any class with Angular behavior (e.g. the `ngOnDestroy` lifecycle hook) is decorated using an Angular decorator, which meant that `@Injectable()` may need to have been added to abstract base classes. Doing so would then report an error if `strictInjectionParameters` is enabled, if the abstract class has an incompatible constructor for DI purposes. This may be fine though, as a subclass may call the constructor explicitly without relying on Angular's DI mechanism. Therefore, this commit excludes abstract classes from the `strictInjectionParameters` check. This avoids an error from being reported at compile time. If the constructor ends up being used by Angular's DI system at runtime, then the factory function of the abstract class will throw an error by means of the `ɵɵinvalidFactory` instruction. In addition to the runtime error, this commit also analyzes the inheritance chain of an injectable without a constructor to verify that their inherited constructor is valid. BREAKING CHANGE: Invalid constructors for DI may now report compilation errors When a class inherits its constructor from a base class, the compiler may now report an error when that constructor cannot be used for DI purposes. This may either be because the base class is missing an Angular decorator such as `@Injectable()` or `@Directive()`, or because the constructor contains parameters which do not have an associated token (such as primitive types like `string`). These situations used to behave unexpectedly at runtime, where the class may be constructed without any of its constructor parameters, so this is now reported as an error during compilation. Any new errors that may be reported because of this change can be resolved either by decorating the base class from which the constructor is inherited, or by adding an explicit constructor to the class for which the error is reported. Closes #37914 PR Close #44615 10 October 2022, 21:46:25 UTC
48b354a fix(compiler): update element schema (#47552) Updates the DOM element schema to add the `hgroup` element and to include some properties that weren't supported the last time the schema was updated. Fixes #47545. PR Close #47552 10 October 2022, 21:33:45 UTC
bebef5f feat(language-service): Quick fix to import a component when its selector is used (#47088) The language service can now generate an import corresponding to a selector. This includes both the TypeScript module import and the decorator import. This applies to both standalone components and components declared in NgModules. PR Close #47088 10 October 2022, 21:32:43 UTC
75e6297 feat(common): add <link> preload tag on server for priority img (#47343) This commit adds a logic that generates preload tags for priority images, when rendering happens on the server (e.g. Angular Universal). PR Close #47343 10 October 2022, 20:48:10 UTC
f467c9e build: update scorecard action dependencies (#47385) See associated pull request for more information. PR Close #47385 10 October 2022, 20:05:23 UTC
6bcde0e build(docs-infra): upgrade cli command docs sources to 46cb32b90 (#47703) Updating [angular#main](https://github.com/angular/angular/tree/main) from [cli-builds#main](https://github.com/angular/cli-builds/tree/main). ## Relevant changes in [commit range](https://github.com/angular/cli-builds/compare/77c70052e...46cb32b90): **Modified** - help/generate.json PR Close #47703 10 October 2022, 20:04:56 UTC
a8569e3 feat(forms): export forms utility functions: isFormArray, isFormGroup… (#47718) This commit exports existing utility functions to check for control instances: isFormControl, isFormGroup, isFormRecord, isFormArray Those are useful when implementing validators that use the specifics of one of those control types. To narrow down the type to what it actually is, we can now use the util functions in validators: ``` export const myArrayValidator: ValidatorFn = (control) => { if (!isFormArray(control)) { return null; } // now you can use FormArray-specific members, e.g.: if (control.controls.every(c => !!c.value) { return { myerror: true } } else { return null; } } ``` PR Close #47718 10 October 2022, 19:43:26 UTC
c0c7efa feat(common): add `provideLocationMocks()` function to provide Location mocks (#47674) This commit adds the `provideLocationMocks()` function that returns mocks for the `Location` and `LocationStrategy` classes. This function can be used in tests to configure an environment where it's possible to fire simulated location events (helpful when testing Router configuration). PR Close #47674 10 October 2022, 19:42:11 UTC
4fde292 feat(common): Add automatic srcset generation to ngOptimizedImage (#47547) Add a feature to automatically generate the srcset attribute for images using the NgOptimizedImage directive. Uses the 'sizes' attribute to determine the appropriate srcset to generate. PR Close #47547 10 October 2022, 16:21:08 UTC
ed11a13 feat(core): drop support for TypeScript 4.6 and 4.7 (#47690) Updates the version range in the compiler to require at least TypeScript 4.8. Note that I'm keeping the backwards-compatibility layer for 4.7 around for now until internal projects have been migrated to 4.8. BREAKING CHANGE: TypeScript versions older than 4.8 are no longer supported. PR Close #47690 10 October 2022, 16:18:56 UTC
370aa34 build: update dependency google-closure-compiler to v20221004 (#47696) See associated pull request for more information. PR Close #47696 10 October 2022, 16:09:15 UTC
6bdba61 build: update dependency @rollup/plugin-babel to v6 (#47701) See associated pull request for more information. PR Close #47701 10 October 2022, 16:05:33 UTC
07017a7 feat(router): prevent `provideRouter()` from usage in @Component (#47669) This commit switches `provideRouter()` to return the new `EnvironmentProviders` wrapper type, preventing it from being accidentally (or intentionally) included in `@Component.providers`. PR Close #47669 07 October 2022, 21:03:13 UTC
7de1469 feat(core): introduce EnvironmentProviders wrapper type (#47669) This commit introduces a new type `EnvironmentProviders` which can be used in contexts where Angular accepted `Provider`s destined for `EnvironmentInjector`s. This includes contexts such as `@NgModule.providers` and `Route.providers`. The new type is useful for preventing such providers from accidentally ending up in `@Component.providers`. It can be used as the return type of provider functions (such as `provideRouter`) to enforce this safety. Because `Provider` allows `any[]` nested arrays, the compile-time safety provided by `EnvironmentProviders` is easily circumvented. However, the runtime shape of `EnvironmentProviders` is not compatible with component injectors and will result in a runtime error if it leaks through (NG0207). A new function `makeEnvironmentProviders` is used to construct this new type from an array of providers. The existing `importProvidersFrom` operation previously returned a very similar type `ImportedNgModuleProviders` which had the same goal. This machinery is switched over to use the new `EnvironmentProviders` interface instead (in fact, `ImportedNgModuleProviders` is now just an alias to `EnvironmentProviders`). PR Close #47669 07 October 2022, 21:03:13 UTC
c5a1b90 refactor(core): support `EnvironmentProviders` types internally (#47669) This commit modifies `R3Injector` and other code in Angular that deals with providers, to handle `EnvironmentProviders` objects as well as normal `Provider` types. There is no user-visible impact to this change, but it prepares the core of the DI system for the introduction of `EnvironmentProviders` as a public feature. PR Close #47669 07 October 2022, 21:03:13 UTC
3133351 refactor(core): define shape of EnvironmentProviders interface (#47669) This commit introduces the `EnvironmentProviders` interface, but does not yet export it as public API. PR Close #47669 07 October 2022, 21:03:13 UTC
deb4cab docs: update spelling dictionary (#47697) PR Close #47697 07 October 2022, 18:45:32 UTC
33dc1e6 docs: remove assorted lint errors (#47693) PR Close #47693 07 October 2022, 17:42:12 UTC
7bee28d feat(router): add a migration to remove `relativeLinkResolution` usages (#47604) As of Angular v15, the deprecated `relativeLinkResolution` config option of the Router is removed. This migration cleans up (removes) the `relativeLinkResolution` fields from the Router config objects in applications code. ```ts import { RouterModule } from '@angular/router'; RouterModule.forRoot([], { relativeLinkResolution: 'legacy', enableTracing: false, }); ``` ```ts import { RouterModule } from '@angular/router'; RouterModule.forRoot([], { // the `relativeLinkResolution` is removed enableTracing: false, }); ``` PR Close #47604 07 October 2022, 17:28:42 UTC
739e689 build: setup remote execution through shared command (#47537) Sets up remote execution through a shared command. PR Close #47537 07 October 2022, 16:31:30 UTC
bdb5371 feat(common): add injection token for default DatePipe configuration (#47157) This commit introduces a new `DATE_PIPE_DEFAULT_OPTIONS` token, which can be used to configure default DatePipe options, such as date format and timezone. DEPRECATED: The `DATE_PIPE_DEFAULT_TIMEZONE` token is now deprecated in favor of the `DATE_PIPE_DEFAULT_OPTIONS` token, which accepts an object as a value and the timezone can be defined as a field (called `timezone`) on that object. PR Close #47157 07 October 2022, 16:16:00 UTC
a792bf1 perf(compiler-cli): minimize filesystem calls when generating shims (#47682) Previously when a file was being analyzed to determine if a shim should be generated, up to two calls to the host `fileExists` function per file per generator were made. In the default host, each `fileExists` call made two underlying file system calls. Following these calls, the file was then read via `getSourceFile`. However, `getSourceFile` will return `undefined` if the requested file does not exist. As a result, `getSourceFile` can be used directly to request both potential file names and leverage the return value to determine if the file does not exist. This avoids the need to call `fileExists` at all. PR Close #47682 07 October 2022, 16:10:34 UTC
ea16a98 fix(http): better handle unexpected `undefined` XSRF tokens (#47683) `HttpXsrfTokenExtractor` allows returning `string|null` for an XSRF token, and the interceptor checked if the returned token is `null`. However, some implementations return `undefined` instead (behind an `any`) type, which caused the interceptor to crash when trying to set an `undefined` value for the header. This commit makes the XSRF interceptor a little more resilient against such broken implementations of the `HttpXsrfTokenExtractor` interface. PR Close #47683 06 October 2022, 23:41:06 UTC
84478f5 refactor(docs-infra): add new Input for better description of close button in notification component (#47681) Add a new input for banner description with default value, allowing the insertion of other descriptions and if nothing is passed, it assumes a default value. PR Close #47681 06 October 2022, 23:23:42 UTC
8d1f28a docs: add Marko to GDE resources (#47595) PR Close #47595 06 October 2022, 21:23:32 UTC
214baea docs: fixed typo in AsyncValidatorFn (#47465) the return type must be Observable<ValidationErrors | null> instead of Observable<ValidationErrors> | null PR Close #47465 06 October 2022, 21:00:49 UTC
5377e35 docs: fix documentation linting errors in ajs-quick-reference.md (#47526) PR Close #47526 06 October 2022, 20:27:26 UTC
bf6679a docs(forms): setErrors emitEvent default value (#47546) PR Close #47546 06 October 2022, 20:24:52 UTC
7032910 ci: cleanup PullApprove config file (#47611) This commit updates the PullApprove config file. PR Close #47611 06 October 2022, 20:04:53 UTC
c09c1bb docs(http): fix copy-paste error in HttpClientJsonpModule docs (#47502) This commit deletes a sentence from the `HttpClientJsonpModule` docs which was accidentally copy-pasted from the docs for another symbol. PR Close #47502 06 October 2022, 19:02:46 UTC
3ba99e2 feat(http): allow for child `HttpClient`s to request via parents (#47502) Ordinarily, providing `HttpClient` (either via `provideHttpClient` or the `HttpClientModule`) creates an entirely separate HTTP context. Requests made via that client are not passed through the interceptor chains that are configured in a parent injector, for this example. This commit introduces a new option for `provideHttpClient` called `withRequestsMadeViaParent()`. When this option is passed, requests made in the child context flow through any injectors, etc. and are then handed off to the parent context. This addresses a longstanding issue with interceptors where it's not possible to extend the set of interceptors in a child context without repeating all of the interceptors from the parent. PR Close #47502 06 October 2022, 19:02:46 UTC
62c7a7a feat(http): introduce functional interceptors (#47502) This commit introduces a new feature for `provideHttpClient` called `withInterceptors`. This feature exposes and configures the new concept of functional interceptors. Functional interceptors use functions instead of classes to implement an HTTP interceptor. Such interceptor functions have access to the DI context from the `EnvironmentInjector` in which they're configured via the `inject()` function. Otherwise, functional interceptors are identical in capability to the existing interceptor system. PR Close #47502 06 October 2022, 19:02:46 UTC
fc69c80 refactor(http): convert NgModules to use `provideHttpClient` internally (#47502) This commit converts `HttpClientModule` to use `provideHttpClient()` internally, with a particular configuration of features. Other NgModules related to configuring `HttpClient` are also converted to use the providers directly from various features, to ensure consistency of behavior. PR Close #47502 06 October 2022, 19:02:45 UTC
e47b129 feat(http): introduce the `provideHttpClient()` API (#47502) This commit introduces the main components of the `provideHttpClient()` provider API, designed in the style of `provideRouter()`. Initial features are defined for including legacy class-based interceptors, JSONP support, and configuring or disabling the builtin XSRF protection. This API is an alternative to providing `HttpClient` via the `HttpClientModule`, and is more tree-shakable and more capable than the NgModule implementation. Tests are included to validate the new configuration format as well as the interoperability of the two styles of providing and configuring `HttpClient`. PR Close #47502 06 October 2022, 19:02:45 UTC
84d0d33 feat(http): introduce `provideHttpClientTesting` provider function (#47502) This commit introduces the `provideHttpClientTesting()` function as an alternative to the `HttpClientTestingModule` (in fact, the NgModule is converted internally to just use the new provider function). PR Close #47502 06 October 2022, 19:02:45 UTC
67ef8b1 refactor(http): convert the XSRF interceptor to functional style (#47502) This commit converts the XSRF interceptor into a functional interceptor instead of a legacy class-based interceptor. PR Close #47502 06 October 2022, 19:02:45 UTC
ab6a3d7 refactor(http): provide XSRF configuration tokens in root (#47502) This commit switches the XSRF configuration tokens (for header name and cookie name) to be `providedIn: 'root'`. This is a no-op change now as they are always provided along with any usage of them via `HttpClientModule`, but will become load-bearing as the `provideHttpClient` API will not provide these tokens, and will rely on injecting them from either the parent context or from these root providers. PR Close #47502 06 October 2022, 19:02:45 UTC
d98d8d7 refactor(http): use an InjectionToken to disable the XSRF interceptor (#47502) @angular/common/http has XSRF protection which is enabled by default and is implemented as an interceptor. Previously, this protection could be disabled with an API which would internally provide a `NoopInterceptor` in place of the standard XSRF interceptor. To achieve the same capability of disabling the XSRF interceptor after it is converted to the functional style, an InjectionToken is added in this commit which disables the XSRF interceptor. This way, the interceptor can be disabled in place without needing to override it via DI (which is difficult for functional interceptors). PR Close #47502 06 October 2022, 19:02:45 UTC
c3ecd8f refactor(http): convert the JSONP interceptor to the functional style (#47502) This commit rewrites the JSONP interceptor to use the functional interceptor style internally, while still maintaining the same public API and behavior. PR Close #47502 06 October 2022, 19:02:45 UTC
546f9ca refactor(http): use a DI token for new interceptors (#47502) This commit introduces a new DI token for the set of functional interceptors. This is a no-op in terms of behavior currently, but will allow for the deduplication of the bridge interceptor which connects legacy class- based interceptors to the functional interceptor chain. PR Close #47502 06 October 2022, 19:02:45 UTC
d7683a6 refactor(http): introduce the functional interceptors API (#47502) This commit introduces new types and symbols related to functional HTTP interceptors - interceptors which are plain functions with access to DI via the `inject()` operation. This new form of interceptor is not exposed publically in this commit, but the legacy class-based interceptors are refactored to be built on top of the new API internally. PR Close #47502 06 October 2022, 19:02:45 UTC
16c8f55 feat(router): migrate `RouterLinkWithHref` references to `RouterLink` (#47599) Since Angular v15, the `RouterLink` contains the logic of the `RouterLinkWithHref` directive and now developers can always import and use the `RouterLink` directive when they need to add a `[routerLink]` in templates. This migration finds all imports and usages of the `RouterLinkWithHref` class and rewrites them to `RouterLink` instead. ```ts import { RouterLinkWithHref } from '@angular/router'; @Component({ standalone: true, template: `<a [routerLink]="'/abc'">`, imports: [RouterLinkWithHref] }) export class MyComponent { @ViewChild(RouterLinkWithHref) aLink!: RouterLinkWithHref; } ``` ```ts import { RouterLink } from '@angular/router'; @Component({ standalone: true, template: `<a [routerLink]="'/abc'">`, imports: [RouterLink] }) export class MyComponent { @ViewChild(RouterLink) aLink!: RouterLink; } ``` PR Close #47599 06 October 2022, 18:57:37 UTC
db28bad feat(core): enable the new directive composition API (#47642) Enables the new directive composition API by exposing the `hostDirectives` property on the `Directive` and `Component` decorators. Also cleans up some casts that were put in place while the feature was being developed. Fixes #8785. PR Close #47642 06 October 2022, 18:11:45 UTC
7702a3d docs: fix linter errors for lightweight-injection-tokens.md (#47673) PR Close #47673 06 October 2022, 18:10:34 UTC
e0dd2c5 build: update cross-repo angular dependencies (#47600) See associated pull request for more information. PR Close #47600 06 October 2022, 16:53:39 UTC
5d002df docs: fix linter errors for lazy-loading-ngmodules.md (#47645) Update aio/content/guide/lazy-loading-ngmodules.md Co-authored-by: Bob Watson <104218420+bob-watson@users.noreply.github.com> PR Close #47645 06 October 2022, 16:50:00 UTC
fcea8fe docs: fix linter errors for libraries.md (#47668) PR Close #47668 06 October 2022, 16:48:39 UTC
cf88a3c build: add atscott to unavailable list for pullapprove (#47658) atscott is unavailable to review PRs until no longer OOO PR Close #47658 06 October 2022, 16:05:20 UTC
f73ef21 feat(router): merge `RouterLinkWithHref` into `RouterLink` (#47630) This commit updates the `RouterLink` to extend the selector to also include `<a>` and `<area>` elements, which were previously matched by the `RouterLinkWithHref` directive. The code of the directives was merged together (since there was a lot of duplication) and this commit finalizes the merge. The `RouterLinkWithHref` becomes an alias of the `RouterLink` directive. Now there is no need to import and use the `RouterLinkWithHref` class, the `RouterLink` directive will match any element that has the `routerLink` attribute. DEPRECATED: The `RouterLinkWithHref` directive is deprecated, use the `RouterLink` directive instead. The `RouterLink` contains the code from the `RouterLinkWithHref` to handle elements with `href` attributes. PR Close #47630 05 October 2022, 22:16:43 UTC
8df8c77 refactor(compiler): Add `getPotentialImportsFor` method on template type checker (#47631) `getPotentialImportsFor` returns an array of possible imports, including TypeScript module specifier and identifier name, for a requested trait in the context of a given component. PR Close #47631 05 October 2022, 20:44:05 UTC
0035ccf docs: fix linter errors for angular-compiler-options.md page (#47179) (#47618) fixup! docs: fix linter errors for angular-compiler-options.md page (#47179) PR Close #47618 05 October 2022, 20:43:24 UTC
19ad498 fix(compiler-cli): use @ts-ignore. (#47636) The previous commit 2e1dddec45 used `@ts-expect-error` to suppress the current error, with the intent of being informed once that's no longer an error, ie. when we updated to an upstream TS version that includes this change. However this unfortunately means the change is incompatible with the fixed version, which prevents it from working with an updated TS version in google3. This change reverts back to the original `@ts-ignore` which is forwards and backwards compatible, avoiding that problem (but unfortunately losing the benefit of being notified once fixed). PR Close #47636 05 October 2022, 20:37:11 UTC
7b89d95 fix(router): Remove deprecated relativeLinkResolution (#47623) The `relativeLinkResolution` is no longer supported. The only behavior now is the correct behavior. BREAKING CHANGE: `relativeLinkResolution` is no longer configurable in the Router. This option was used as a means to opt out of a bug fix. PR Close #47623 05 October 2022, 15:57:28 UTC
2cdf128 release: cut the v15.0.0-next.5 release 05 October 2022, 15:50:18 UTC
8352cf7 docs: release notes for the v14.2.5 release 05 October 2022, 15:43:32 UTC
ab4ef26 refactor(router): drop own constructor from the `RouterLinkWithHref` class (#47619) This commit updates the `RouterLinkWithHref` class to further align with the `RouterLink` class by removing own constructor from the `RouterLinkWithHref` class. PR Close #47619 04 October 2022, 23:21:35 UTC
2f07610 test(router): Ensure change detection runs after navigation (#47629) Components are not fully rendered until change detection runs. PR Close #47629 04 October 2022, 23:19:32 UTC
da58801 feat(router): auto-unwrap default exports when lazy loading (#47586) When using `loadChildren` or `loadComponent`, a common pattern is to pass a function that returns a `Promise` from a dynamic import: ```typescript { path: 'lazy', loadComponent: () => import('./lazy-file').then(m => m.LazyCmp), } ``` The `.then` part of the expression selects the particular exported component symbol from the dynamically imported ES module. ES modules can have a "default export", created with the `export default` modifier: ```typescript @Component({...}) export default class LazyCmp { ... } ``` This default export is made available to dynamic imports under the well- known key of `'default'`, per the ES module spec: https://tc39.es/ecma262/#table-export-forms-mapping-to-exportentry-records This commit adds a feature to the router to automatically dereference such default exports. With this logic, when `export default` is used, a `.then` operation to select the particular exported symbol is no longer required: ```typescript { path: 'lazy', loadComponent: () => import('./lazy-file'), } ``` The above `loadComponent` operation will automatically use the `default` export of the `lazy-file` ES module. This functionality works for `loadChildren` as well. PR Close #47586 04 October 2022, 21:40:58 UTC
a2a066d refactor(router): organize deprecated loadChildren code (#47586) This commit breaks out the code in @angular/router needed to support the deprecated `loadChildren` signature into a separate file, which reduces the opportunity for conflicts when patching that behavior in g3. PR Close #47586 04 October 2022, 21:40:58 UTC
2919463 refactor(compiler): Rename `PipeInScope` -> `PotentialPipe` (#47561) Now that `getPotentialTemplateDirectives` uses `PotentialDirective`, we should rename `PipeInScope` to match. PR Close #47561 04 October 2022, 21:40:04 UTC
79c016d refactor(compiler): Add `getPotentialTemplateDirectives` API method. (#47561) `getPotentialTemplateDirectives` returns possible directives which can be used in the provided context, whether already in scope or requiring an import. This is necessary to implement auto-import support for standalone components in the language service. PR Close #47561 04 October 2022, 21:40:04 UTC
3783ee0 refactor(compiler): Rename `DirectiveInScope` -> `PotentialDirective` (#47561) After implementing `getPotentialTemplateDirectives`, we will use this data struture to represent both in-scope and out-of-scope directives. So this rename is an advance cleanup. PR Close #47561 04 October 2022, 21:40:04 UTC
e3cef4a docs(core): deprecate `providedIn: NgModule` and `providedIn: 'any'` (#47616) This commit deprecates the above two forms of `providedIn`. DEPRECATED: - The ability to pass an `NgModule` to the `providedIn` option for `@Injectable` and `InjectionToken` is now deprecated. `providedIn: NgModule` was intended to be a tree-shakable alternative to NgModule providers. It does not have wide usage, and in most cases is used incorrectly, in circumstances where `providedIn: 'root'` should be preferred. If providers should truly be scoped to a specific NgModule, use `NgModule.providers` instead. - The ability to set `providedIn: 'any'` for an `@Injectable` or `InjectionToken` is now deprecated. `providedIn: 'any'` is an option with confusing semantics and is almost never used apart from a handful of esoteric cases internal to the framework. PR Close #47616 04 October 2022, 18:52:38 UTC
7ab10a5 docs: add Jordan Powell to GDE resources (#47598) PR Close #47598 04 October 2022, 18:52:04 UTC
02f3d12 refactor(core): support host directives on a root component (#47620) Adds support for host directives on the root component by calling `findHostDirectiveDefs` and passing the results to the relevant functions. PR Close #47620 04 October 2022, 18:51:29 UTC
2e1ddde fix(compiler-cli): support hasInvalidatedResolutions. (#47585) The latest TypeScript compiler exposes the previously private field `hasInvalidatedResolutions`. That breaks Angular in the newer TS, because the new field would be required on DelegatingCompilerHost. However we cannot just add the field here, because it's not present in the older compiler. This change adds the field for delegation, which works at runtime because the field is present. It suppresses the compiler error using a `// @ts-expect-error`, which should be removed once Angular moves to a TSC version that includes this change. PR Close #47585 04 October 2022, 18:50:47 UTC
c3f8579 feat(router): make RouterOutlet name an Input so it can be set dynamically (#46569) This commit updates the 'name' of `RouterOutlet` to be an `Input` rather than an attribute. Note that this change does not affect `[attr.name]=` because those already would not have worked. The static name was only read in the constructor and if it wasn't available, it would use 'PRIMARY' instead. fixes #12522 BREAKING CHANGE: Previously, the `RouterOutlet` would immediately instantiate the component being activated during navigation. Now the component is not instantiated until the change detection runs. This could affect tests which do not trigger change detection after a router navigation. In rarer cases, this can affect production code that relies on the exact timing of component availability. PR Close #46569 04 October 2022, 14:57:25 UTC
07d9a27 refactor(core): handle ngOnChanges in host directives (#47597) The `NgOnChanges` feature matches some legacy ViewEngine behavior where the keys in the `SimpleChanges` object are based on the *declared* names of the inputs, not the public or minified names. This is achieved by constructing the `DirectiveDef.declaredInputs` object at the same time as when `DirectiveDef.inputs` is created. This logic breaks down for host directives, because they can re-alias the input under a different public name which won't be present in the `declaredInputs`. These changes add some logic to patch the directive def aliases onto the `declaredInputs`. There is some validation in place to ensure that this patching doesn't overwrite any pre-existing inputs. PR Close #47597 03 October 2022, 17:07:51 UTC
4ba2d3d docs: add missing link to canMatch guard (#47602) PR Close #47602 03 October 2022, 15:47:27 UTC
400a6b5 fix(localize): add polyfill in polyfills array instead of polyfills.ts (#47569) With the recent changes in the Angular CLI (https://github.com/angular/angular-cli/pull/23938) the polyfills option accepts module path that are resolved using Node module resolution. Also, the polyfills.ts file is no longer generated by default. This commit changes the way on how the polyfill is added to the projects. PR Close #47569 03 October 2022, 15:47:03 UTC
9eb3891 refactor(router): apply `href` value via renderer to further align RouterLink directives (#47605) This commit updates the `RouterLink` directive to use a renderer to apply an `href` attribute value. Previously, the `RouterLinkWithHref` used a host binding for this and that prevented further merge of the `RouterLink` and `RouterLinkWithHref` directives. PR Close #47605 03 October 2022, 15:45:46 UTC
382330c build(docs-infra): upgrade cli command docs sources to 77c70052e (#47590) Updating [angular#main](https://github.com/angular/angular/tree/main) from [cli-builds#main](https://github.com/angular/cli-builds/tree/main). ## Relevant changes in [commit range](https://github.com/angular/cli-builds/compare/556a775f3...77c70052e): **Modified** - help/completion.json PR Close #47590 30 September 2022, 17:54:00 UTC
ce59f1a test: delete bazel_ngtsc_plugin integration test (#47584) This does not provide any added value. PR Close #47584 30 September 2022, 17:53:04 UTC
b2aa9ce build: update puppeteer to 18.0.5 (#47584) This is needed as Angular does not support Chrome 93. PR Close #47584 30 September 2022, 17:53:04 UTC
back to top