angular-html-parser
Advanced tools
Changelog
18.0.1 (2024-05-29)
| Commit | Type | Description | | -- | -- | -- | | 419ffa2026 | fix | optimize track function that only passes $index (#55872) |
| Commit | Type | Description | | -- | -- | -- | | 4c7efc005a | fix | interpolatedSignalNotInvoked diagnostic for class, style, attribute and animation bindings (#55969) |
| Commit | Type | Description | | -- | -- | -- | | 4e6ea0e19c | fix | handle elements with local refs in event replay serialization logic (#56076) | | d73a0175cb | fix | link errors to ADEV (#55554) | | 985a215b10 | fix | typo in zoneless warning (#55974) |
| Commit | Type | Description | | -- | -- | -- | | ba85d08158 | fix | handle empty ngSwitchCase (#56105) |
<!-- CHANGELOG SPLIT MARKER --><a name="17.3.10"></a>
Changelog
18.0.0 (2024-05-22)
Blog post "Angular v18 is now available".
matchesElement
method has been removed from AnimationDriver
as it is unused.isPlatformWorkerUi
and isPlatformWorkerApp
have been removed without replacement, as they serve no purpose since the removal of the WebWorker platform.OnPush
views at the root of the application need to
be marked dirty for their host bindings to refresh. Previously, the host
bindings were refreshed for all root views without respecting the
OnPush
change detection strategy.
OnPush
views at the root of the application need to
be marked dirty for their host bindings to refresh. Previously, the host
bindings were refreshed for all root views without respecting the
OnPush
change detection strategy.
The ComponentFixture
autoDetect
feature will no
longer refresh the component's host view when the component is OnPush
and not marked dirty. This exposes existing issues in components which
claim to be OnPush
but do not correctly call markForCheck
when they
need to be refreshed. If this change causes test failures, the easiest
fix is to change the component to ChangeDetectionStrategy.Default
.
ComponentFixture.whenStable
now matches the
ApplicationRef.isStable
observable. Prior to this change, stability
of the fixture did not include everything that was considered in
ApplicationRef
. whenStable
of the fixture will now include unfinished
router navigations and unfinished HttpClient
requests. This will cause
tests that await
the whenStable
promise to time out when there are
incomplete requests. To fix this, remove the whenStable
,
instead wait for another condition, or ensure HttpTestingController
mocks responses for all requests. Try adding HttpTestingController.verify()
before your await fixture.whenStable
to identify the open requests.
Also, make sure your tests wait for the stability promise. We found many
examples of tests that did not, meaning the expectations did not execute
within the test body.
In addition, ComponentFixture.isStable
would synchronously switch to
true in some scenarios but will now always be asynchronous.
Angular will ensure change detection runs, even when the state update originates from outside the zone, tests may observe additional rounds of change detection compared to the previous behavior.
This change will be more likely to impact existing unit tests.
This should usually be seen as more correct and the test should be updated,
but in cases where it is too much effort to debug, the test can revert to the old behavior by adding
provideZoneChangeDetection({schedulingMode: NgZoneSchedulingMode.NgZoneOnly})
to the TestBed
providers.
Similarly, applications which may want to update state outside the zone
and not trigger change detection can add
provideZoneChangeDetection({schedulingMode: NgZoneSchedulingMode.NgZoneOnly})
to the providers in bootstrapApplication
or add
schedulingMode: NgZoneSchedulingMode.NgZoneOnly
to the
BootstrapOptions
of bootstrapModule
.
When Angular runs change detection, it will continue to
refresh any views attached to ApplicationRef
that are still marked for
check after one round completes. In rare cases, this can result in infinite
loops when certain patterns continue to mark views for check using
ChangeDetectorRef.detectChanges
. This will be surfaced as a runtime
error with the NG0103
code.
async
has been removed, use waitForAsync
instead.
The ComponentFixture.autoDetect
feature now executes
change detection for the fixture within ApplicationRef.tick
. This more
closely matches the behavior of how a component would refresh in
production. The order of component refresh in tests may be slightly
affected as a result, especially when dealing with additional components
attached to the application, such as dialogs. Tests sensitive to this
type of change (such as screenshot tests) may need to be updated.
Concretely, this change means that the component will refresh before
additional views attached to ApplicationRef
(i.e. dialog components).
Prior to this change, the fixture component would refresh after other
views attached to the application.
The exact timing of change detection execution when
using event or run coalescing with NgZone
is now the first of either
setTimeout
or requestAnimationFrame
. Code which relies on this
timing (usually by accident) will need to be adjusted. If a callback
needs to execute after change detection, we recommend afterNextRender
instead of something like setTimeout
.
Newly created and views marked for check and reattached
during change detection are now guaranteed to be refreshed in that same
change detection cycle. Previously, if they were attached at a location
in the view tree that was already checked, they would either throw
ExpressionChangedAfterItHasBeenCheckedError
or not be refreshed until
some future round of change detection. In rare circumstances, this
correction can cause issues. We identified one instance that relied on
the previous behavior by reading a value on initialization which was
queued to be updated in a microtask instead of being available in the
current change detection round. The component only read this value during
initialization and did not read it again after the microtask updated it.
Testability methods increasePendingRequestCount
,
decreasePendingRequestCount
and getPendingRequestCount
have been
removed. This information is tracked with zones.
By default we now prevent caching of HTTP requests that require authorization . To opt-out from this behaviour use the includeRequestsWithAuthHeaders
option in withHttpTransferCache
.
Example:
withHttpTransferCache({
includeRequestsWithAuthHeaders: true,
})
StateKey
, TransferState
and makeStateKey
have been removed from @angular/platform-browser
, use the same APIs from @angular/core
.RESOURCE_CACHE_PROVIDER
APIs have been removed.deprecated platformDynamicServer
has been removed. Add an import @angular/compiler
and replace the usage with platformServer
deprecated ServerTransferStateModule
has been removed. TransferState
can be use without providing this module.
deprecated useAbsoluteUrl
and baseUrl
been removed from PlatformConfig
. Provide and absolute url
instead.
Legacy handling or Node.js URL parsing has been removed from ServerPlatformLocation
.
The main differences are;
pathname
is always suffixed with a /
.port
is empty when http:
protocol and port in url is 80
port
is empty when https:
protocol and port in url is 443
RedirectCommand
for redirects
in addition to UrlTree
. Code which expects only boolean
or UrlTree
values in Route
types will need to be adjusted.Route.redirectTo
to be a function
in addition to the previous string. Code which expects redirectTo
to
only be a string on Route
objects will need to be adjusted.UrlTree
as a redirect, the
redirecting navigation will now use replaceUrl
if the initial
navigation was also using the replaceUrl
option. If this is not
desirable, the redirect can configure new NavigationBehaviorOptions
by
returning a RedirectCommand
with the desired options instead of UrlTree
.RouterOutlet
. This means that providers available only to the
component that defines the RouterOutlet
will no longer be available to
route components in any circumstances. This was already the case
whenever routes defined providers, either through lazy loading an
NgModule
or through explicit providers
on the route config.RouterOutlet
. This means that providers available only to the
component that defines the RouterOutlet
will no longer be available to
route components in any circumstances. This was already the case
whenever routes defined providers, either through lazy loading an
NgModule
or through explicit providers
on the route config.getCurrencySymbol
, getLocaleCurrencyCode
, getLocaleCurrencyName
, getLocaleCurrencySymbol
, getLocaleDateFormat
, getLocaleDateTimeFormat
, getLocaleDayNames
, getLocaleDayPeriods
, getLocaleDirection
, getLocaleEraNames
, getLocaleExtraDayPeriodRules
, getLocaleExtraDayPeriods
, getLocaleFirstDayOfWeek
, getLocaleId
, getLocaleMonthNames
, getLocaleNumberFormat
, getLocaleNumberSymbol
, getLocalePluralCase
, getLocaleTimeFormat
, getLocaleWeekEndRange
, getNumberOfCurrencyDigits
@Component.interpolation
is deprecated. Use Angular's
delimiters instead.HttpClientModule
, HttpClientXsrfModule
and HttpClientJsonpModule
As mentionned, those modules can be replaced by provider function only.
| Commit | Type | Description |
| -- | -- | -- |
| bcce85af72 | refactor | remove deprecated matchesElement
from AnimationDriver
(#55479) |
| Commit | Type | Description |
| -- | -- | -- |
| d34c033902 | refactor | Deprecate Local Data API functions (#54483) |
| 3b0de30b37 | refactor | remove deprecated isPlatformWorkerApp
and isPlatformWorkerUi
API (#55302) |
| Commit | Type | Description |
| -- | -- | -- |
| 91b007e58f | fix | add math elements to schema (#55631) |
| 33d0102304 | fix | allow comments between connected blocks (#55966) |
| 7fc7f3f05f | fix | capture all control flow branches for content projection in if blocks (#54921) |
| a369f43fbd | fix | capture switch block cases for content projection (#54921) |
| eb625d3783 | fix | declare for loop aliases in addition to new name (#54942) |
| f824911510 | fix | For FatalDiagnosticError
, hide the message
field without affecting the emit (#55160) |
| a040fb720a | fix | maintain multiline CSS selectors during CSS scoping (#55509) |
| 39624c6b12 | fix | output input flags as a literal (#55215) |
| eba92cfa55 | fix | prevent usage of reserved control flow symbol in custom interpolation context. (#55809) |
| 7d5bc1c628 | fix | remove container index from conditional instruction (#55190) |
| 4eb0165750 | fix | remove support for unassignable expressions in two-way bindings (#55342) |
| e1650e3b13 | fix | throw error if item name and context variables conflict (#55045) |
| Commit | Type | Description |
| -- | -- | -- |
| 5bd188a394 | feat | add partial compilation support for deferred blocks (#54908) |
| b02b31a915 | feat | drop support for TypeScript older than 5.4 (#54961) |
| 78188e877a | fix | add diagnostic if initializer API is used outside of an initializer (#54993) |
| 69a83993b3 | fix | do not throw when retrieving TCB symbol for signal input with restricted access (#55774) |
| 4f4f41016e | fix | dom property binding check in signal extended diagnostic (#54324) |
| 7a16d7e969 | fix | don't type check the bodies of control flow nodes in basic mode (#55360) |
| 8d93597a82 | fix | fix type narrowing of @if
with aliases (#55835) |
| 9b424d7224 | fix | preserve original reference to non-deferrable dependency (#54759) |
| 694ba79cbf | fix | report cases where initializer APIs are used in a non-directive class (#54993) |
| 6219341d26 | fix | report errors when initializer APIs are used on private fields (#54981) |
| c04ffb1fa6 | fix | use switch statements to narrow Angular switch blocks (#55168) |
| Commit | Type | Description |
| -- | -- | -- |
| a730f09ae9 | feat | Add a public API to establish events to be replayed and an attribute to mark an element with an event handler. (#55356) |
| fdd560ea14 | feat | Add ability to configure zone change detection to use zoneless scheduler (#55252) |
| bce5e2344f | feat | Add build target for jsaction contract binary. (#55319) |
| 666d646575 | feat | Add event delegation library to queue up events and replay them when the application is ready (#55121) |
| 5f06ca8f55 | feat | add HOST_TAG_NAME token (#54751) |
| a600a39d0c | feat | add support for fallback content in ng-content (#54854) |
| 146306a141 | feat | add support for i18n hydration (#54823) |
| f09c5a7bc4 | feat | Add zoneless change detection provider as experimental (#55329) |
| d28614b90e | feat | Modify EventType from an enum to an object. (#55323) |
| ac863ded48 | feat | provide ExperimentalPendingTasks API (#55487) |
| 1ee9f32621 | feat | Synchronize changes from internal JSAction codebase. (#55182) |
| d888da4606 | fix | ApplicationRef.tick
should respect OnPush for host bindings (#53718) |
| 64f870c12b | fix | ApplicationRef.tick
should respect OnPush for host bindings (#53718) (#53718) |
| 8cad4e8cbe | fix | ComponentFixture
autoDetect
respects OnPush
flag of host view (#54824) |
| 658cf8c384 | fix | ComponentFixture
stability should match ApplicationRef
(#54949) |
| 2fc11eae9e | fix | account for re-projected ng-content elements with fallback content (#54854) |
| 0cbd73c6e9 | fix | add warning when using zoneless but zone.js is still loaded (#55769) |
| d5edfde6ee | fix | afterRender hooks registered outside change detection can mark views dirty (#55623) |
| de7447d15e | fix | Angular should not ignore changes that happen outside the zone (#55102) |
| ba8e465974 | fix | Change Detection will continue to refresh views while marked for check (#54734) |
| 5a10f405d3 | fix | complete the removal of deprecation async
function (#55491) |
| 24bc0ed4f2 | fix | ComponentFixture autodetect should detect changes within ApplicationRef.tick (#54733) |
| 1c0ec56c46 | fix | correctly project single-root content inside control flow (#54921) |
| 840c375255 | fix | do not save point-in-time setTimeout
and rAF
references (#55124) |
| 10c5cdb49c | fix | ensure change detection runs in a reasonable timeframe with zone coalescing (#54578) |
| ad045efd4b | fix | Ensure views marked for check are refreshed during change detection (#54735) |
| 69085ea26e | fix | error about provideExperimentalCheckNoChangesForDebug uses wrong name (#55824) |
| 0147e0b85a | fix | exhaustive checkNoChanges should only do a single pass (#55839) |
| e02bcf89cf | fix | Fix clearing of pending task in zoneless cleanup implementation (#55074) |
| 0cec9e4f9a | fix | Fix null dereference error addEvent
(#55353) |
| 44c0ed83a6 | fix | hide implementation details of ExperimentalPendingTasks (#55516) |
| 314112de99 | fix | Prevent markForCheck
during change detection from causing infinite loops (#54900) |
| a5fa279b6e | fix | prevent i18n hydration from cleaning projected nodes (#54823) |
| 6534c035c0 | fix | Remove deprecated Testability methods (#53768) |
| a5c57c7484 | fix | resolve error for multiple component instances that use fallback content (#55478) |
| f44a5e4604 | fix | support content projection and VCRs in i18n (#54823) |
| 0510930a25 | fix | TestBed should not override NgZone from initTestEnvironment (#55226) |
| e9a0c86766 | fix | TestBed should not override NgZone from initTestEnvironment (#55226) |
| 700c0520bb | fix | Update ApplicationRef.tick loop to only throw in dev mode (#54848) |
| a99cb7ce5b | fix | zoneless scheduler should check if Zone is defined before accessing it (#55118) |
| 1fd63e9cff | refactor | deprecate @Component.interpolation
(#55778) |
| Commit | Type | Description | | -- | -- | -- | | 1c736dc3b2 | feat | Unified Control State Change Events (#54579) | | 61007dced0 | fix | Add event for forms submitted & reset (#55667) | | 2e27ca9ddf | fix | Allow canceled async validators to emit. (#55134) |
| Commit | Type | Description |
| -- | -- | -- |
| 6f88d80758 | feat | allow caching requests with different origins between server and client (#55274) |
| 8eacb6e4b9 | feat | exclude caching for authenticated HTTP requests (#55034) |
| d9b339fdbc | fix | resolve withRequestsMadeViaParent
behavior with withFetch
(#55652) |
| ef665a40a5 | refactor | Deprecate HttpClientModule
& related modules (#54020) |
| Commit | Type | Description | | -- | -- | -- | | 6d1b82df32 | fix | allow external projects to use provided compiler options (#55035) | | a48afe0d94 | fix | avoid generating TS syntactic diagnostics for templates (#55091) | | bd236cc150 | fix | implement getDefinitionAtPosition for Angular templates (#55269) | | 4166dfc1b6 | fix | prevent underlying TS Service from handling template files (#55003) | | b7f2fd4739 | fix | use type-only import in plugin factory (#55996) |
| Commit | Type | Description |
| -- | -- | -- |
| f914f6a362 | feat | Migration schematics for HttpClientModule
(#54020) |
| 8459ee46cb | fix | handle more cases in HttpClientModule migration (#55640) |
| c4b2f18709 | fix | migrate HttpClientTestingModule in test modules (#55803) |
| bb4a4016a9 | fix | preserve existing properties in HttpClientModule migration (#55777) |
| f93e5180be | fix | resolve multiple structural issues with HttpClient migration (#55557) |
| Commit | Type | Description | | -- | -- | -- | | 45ae7a6b60 | feat | add withI18nSupport() in developer preview (#55130) | | 23f914f101 | fix | Use the right namespace for mathML. (#55622) | | cba336d4f1 | refactor | remove deprecated transfer state APIs (#55474) |
| Commit | Type | Description |
| -- | -- | -- |
| eb20c1a8b1 | refactor | unused RESOURCE_CACHE_PROVIDER
API has been removed (#54875) |
| Commit | Type | Description |
| -- | -- | -- |
| 5674c644ab | fix | add nonce
attribute to event record script (#55495) |
| e71e869112 | fix | remove event dispatch script from HTML when hydration is disabled (#55681) |
| 07ac017731 | refactor | remove deprecated platformDynamicServer
API (#54874) |
| e8b588d8b7 | refactor | remove deprecated ServerTransferStateModule
API (#54874) |
| 3b1967ca64 | refactor | remove deprecated useAbsoluteUrl
and baseUrl
from PlatformConfig
(#54874) |
| 2357d3566c | refactor | remove legacy URL handling logic (#54874) |
| Commit | Type | Description |
| -- | -- | -- |
| 4a42961393 | feat | withNavigationErrorHandler
can convert errors to redirects (#55370) |
| 8735af08b9 | feat | Add ability to return UrlTree
with NavigationBehaviorOptions
from guards (#45023) |
| 87f3f27f90 | feat | Allow resolvers to return RedirectCommand
(#54556) |
| 2b802587f2 | feat | Allow Route.redirectTo to be a function which returns a string or UrlTree (#52606) |
| 60f1d681e0 | fix | preserve replaceUrl when returning a urlTree from CanActivate (#54042) |
| 3839cfbb18 | fix | Routed components never inherit RouterOutlet
EnvironmentInjector
(#54265) |
| da906fdafc | fix | Routed components never inherit RouterOutlet
EnvironmentInjector
(#54265) |
| Commit | Type | Description |
| -- | -- | -- |
| 3bc63eaaf3 | fix | avoid running CDs on controllerchange
(#54222) |
| e598634c10 | fix | remove controllerchange
listener when app is destroyed (#55365) |
<a name="17.3.9"></a>
Changelog
17.0.1 (2023-11-08)
| Commit | Type | Description | | -- | -- | -- | | 5c6f3f8ec0 | fix | Don't override the backend when using the InMemoryWebAPI (#52425) |
| Commit | Type | Description | | -- | -- | -- | | 70d30c28e0 | fix | Add support for ng-templates with i18n attributes (#52597) | | 4f125c5f9a | fix | Switches to multiple passes to fix several reported bugs (#52592) |
Web Frameworks: the internet frontier.<br/> These are the voyages of the framework Angular.<br/> Its continuing mission:<br/> To explore strange, new technologies.<br/> To seek out new users and new applications.<br/> To boldly go where no web framework has gone before.<br/>
In honor of v17.0.1
______
___.--------'------`---------.____
_.---'----------------------------------`---.__
.'___=]===========================================
,-----------------------..__/.' >--.______ _______.---'
]====================<==||(__) .' `------'
`-----------------------`' ----.___--/
/ /---' `/
/_______(______________________/
`-------------.--------------.'
\________|_.-'
Live long and prosper 🖖🏻
<!-- CHANGELOG SPLIT MARKER --><a name="17.0.0"></a>
Changelog
17.0.0 (2023-11-08)
Blog post "Angular v17 is now available".
Node.js v16 support has been removed and the minimum support version has been bumped to 18.13.0.
Node.js v16 is planned to be End-of-Life on 2023-09-11. Angular will stop supporting Node.js v16 in Angular v17. For Node.js release schedule details, please see: https://github.com/nodejs/release#release-schedule
Angular now requires zone.js
version ~0.14.0
Versions of TypeScript older than 5.2 are no longer supported.
The mutate
method was removed from the WritableSignal
interface and completely
dropped from the public API surface. As an alternative, please use the update
method and
make immutable changes to the object.
Example before:
items.mutate(itemsArray => itemsArray.push(newItem));
Example after:
items.update(itemsArray => [itemsArray, …newItem]);
OnPush
components that are created dynamically now
only have their host bindings refreshed and ngDoCheck run
during change
detection if they are dirty.
Previously, a bug in the change detection would result in the OnPush
configuration of dynamically created components to be ignored when
executing host bindings and the ngDoCheck
function. This is
rarely encountered but can happen if code has a handle on the
ComponentRef
instance and updates values read in the OnPush
component template without then calling either markForCheck
or
detectChanges
on that component's ChangeDetectorRef
.
REMOVE_STYLES_ON_COMPONENT_DESTROY
default value is now true
. This causes CSS of components to be removed from the DOM when destroyed. You retain the previous behaviour by providing the REMOVE_STYLES_ON_COMPONENT_DESTROY
injection token.
import {REMOVE_STYLES_ON_COMPONENT_DESTROY} from '@angular/platform-browser';
...
providers: [{
provide: REMOVE_STYLES_ON_COMPONENT_DESTROY,
useValue: false,
}]
The withNoDomReuse()
function was removed from the public API. If you need to disable hydration, you can exclude the provideClientHydration()
call from provider list in your application (which would disable hydration features for the entire application) or use ngSkipHydration
attribute to disable hydration for particular components. See this guide for additional information: https://angular.io/guide/hydration#how-to-skip-hydration-for-particular-components.
Absolute redirects no longer prevent further redirects. Route configurations may need to be adjusted to prevent infinite redirects where additional redirects were previously ignored after an absolute redirect occurred.
Routes with loadComponent
would incorrectly cause
child routes to inherit their data by default. The default
paramsInheritanceStrategy
is emptyOnly
. If parent data should be
inherited in child routes, this should be manually set to always
.
urlHandlingStrategy
has been removed from the Router public API.
This should instead be configured through the provideRouter or RouterModule.forRoot APIs.
The following Router properties have been removed from the public API:
These should instead be configured through the provideRouter
or
RouterModule.forRoot
APIs.
The setupTestingRouter
function has been removed. Use
RouterModule.forRoot
or provideRouter
to setup the Router
for
tests instead.
malformedUriErrorHandler
is no longer available in
the RouterModule.forRoot
options. URL parsing errors should instead be
handled in the UrlSerializer.parse
method.
Changelog
16.0.2 (2023-05-17)
| Commit | Type | Description |
| -- | -- | -- |
| c1016d4e57 | fix | add additional component metadata to component ID generation (#50340) |
| cc41758b59 | fix | allow onDestroy unregistration while destroying (#50237) |
| 7d679bdb59 | fix | allow passing value of any type to isSignal
function (#50035) |
<a name="16.0.1"></a>
Changelog
16.0.1 (2023-05-10)
| Commit | Type | Description | | -- | -- | -- | | 52c74d3b4a | fix | add additional component metadata to component ID generation (#50203) | | 048b6b1e0d | fix | bootstrapApplication call not rejected when error is thrown in importProvidersFrom module (#50120) | | d68796782f | fix | handle hydration of root components with injected ViewContainerRef (#50136) | | f751ce6445 | fix | handle projection of hydrated containters into components that skip hydration (#50199) | | 346ab73dd9 | fix | only try to retrieve transferred state on the browser (#50144) |
<!-- CHANGELOG SPLIT MARKER --><a name="16.0.0"></a>
Changelog
16.0.0 (2023-05-03)
Blog post "Angular v16 is now available".
EventManager
method addGlobalEventListener
has been removed as it is not used by Ivy.MockPlatformLocation
is now provided by default in tests.
Existing tests may have behaviors which rely on
BrowserPlatformLocation
instead. For example, direct access to the
window.history
in either the test or the component rather than going
through the Angular APIs (Location.getState()
). The quickest fix is to
update the providers in the test suite to override the provider again
TestBed.configureTestingModule({providers: [{provide: PlatformLocation, useClass: BrowserPlatformLocation}]})
.
The ideal fix would be to update the code to instead be compatible with
MockPlatformLocation
instead.Before the change, the following template was compiling:
interface MyContext {
$implicit: string;
}
@Component({
standalone: true,
imports: [NgTemplateOutlet],
selector: 'person',
template: `
<ng-container
*ngTemplateOutlet="
myTemplateRef;
context: { $implicit: 'test', xxx: 'xxx' }
"></ng-container>
`,
})
export class PersonComponent {
myTemplateRef!: TemplateRef<MyContext>;
}
However, it does not compile now because the 'xxx' property does not exist in 'MyContext', resulting in the error: 'Type '{ $implicit: string; xxx: string; }' is not assignable to type 'MyContext'.'
The solution is either:
XhrFactory
export from @angular/common/http
has been removed. Use XhrFactory
from @angular/common
instead.QueryList.filter now supports type guard functions, which will result in type narrowing. Previously if you used type guard functions, it resulted in no changes to the return type. Now the type would be narrowed, which might require updates to the application code that relied on the old behavior.
zone.js
versions 0.11.x
and 0.12.x
are not longer supported.
entryComponents
has been deleted from the @NgModule
and @Component
public APIs. Any usages can be removed since they weren't doing anyting.ANALYZE_FOR_ENTRY_COMPONENTS
injection token has been deleted. Any references can be removed.ComponentRef.setInput will only set the input on the
component if it is different from the previous value (based on Object.is
equality). If code relies on the input always being set, it should be
updated to copy objects or wrap primitives in order to ensure the input
value differs from the previous call to setInput
.
RendererType2.styles
no longer accepts a nested arrays.
The APP_ID
token value is no longer randomly generated. If you are bootstrapping multiple application on the same page you will need to set to provide the APP_ID
yourself.
bootstrapApplication(ComponentA, {
providers: [
{ provide: APP_ID, useValue: 'app-a' },
// ... other providers ...
]
});
The ReflectiveInjector
and related symbols were removed. Please update the code to avoid references to the ReflectiveInjector
symbol. Use Injector.create
as a replacement to create an injector instead.
Node.js v14 support has been removed
Node.js v14 is planned to be End-of-Life on 2023-04-30. Angular will stop supporting Node.js v14 in Angular v16. Angular v16 will continue to officially support Node.js versions v16 and v18.
BrowserTransferStateModule
was removed, since it's no longer needed. The TransferState
class can be injected without providing the module. The BrowserTransferStateModule
was empty starting from v14 and you can just remove the reference to that module from your applications.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.
renderApplication
method no longer accepts a root component as first argument. Instead, provide a bootstrapping function that returns a Promise<ApplicationRef>
.
Before
const output: string = await renderApplication(RootComponent, options);
Now
const bootstrap = () => bootstrapApplication(RootComponent, appConfig);
const output: string = await renderApplication(bootstrap, options);
renderModuleFactory
has been removed. Use renderModule
instead.
Scroll
event's routerEvent
property may also be
a NavigationSkipped
event. Previously, it was only a NavigationEnd
event.ComponentFactoryResolver
has been removed from Router APIs.
Component factories are not required to create an instance of a component
dynamically. Passing a factory resolver via resolver argument is no longer needed
and code can instead use ViewContainerRef.createComponent
without the
factory resolver.RouterEvent
type is no longer present in the Event
union type representing all router event types. If you have code using something like filter((e: Event): e is RouterEvent => e instanceof RouterEvent)
, you'll need to update it to filter((e: Event|RouterEvent): e is RouterEvent => e instanceof RouterEvent)
.ActivatedRoute
instances may need to be adjusted
because Router.createUrlTree now does the right thing in more
scenarios. This means that tests with invalid/incomplete ActivatedRoute mocks
may behave differently than before. Additionally, tests may now navigate
to a real URL where before they would navigate to the root. Ensure that
tests provide expected routes to match.
There is rarely production impact, but it has been found that relative
navigations when using an ActivatedRoute
that does not appear in the
current router state were effectively ignored in the past. By creating
the correct URLs, this sometimes resulted in different navigation
behavior in the application. Most often, this happens when attempting to
create a navigation that only updates query params using an empty
command array, for example router.navigate([], {relativeTo: route, queryParams: newQueryParams})
. In this case, the relativeTo
property
should be removed.makeStateKey
, StateKey
and TransferState
exports have been moved from @angular/platform-browser
to @angular/core
. Please update the imports.- import {makeStateKey, StateKey, TransferState} from '@angular/platform-browser';
+ import {makeStateKey, StateKey, TransferState} from '@angular/core';
EnvironmentInjector.runInContext
is now deprecated, with
runInInjectionContext
functioning as a direct replacement:
// Previous method version (deprecated):
envInjector.runInContext(fn);
// New standalone function:
runInInjectionContext(envInjector, fn);
The @Directive
/@Component
moduleId
property is now
deprecated. It did not have any effect for multiple major versions and
will be removed in v17.
BrowserModule.withServerTransition
has been deprecated. APP_ID
should be used instead to set the application ID.
NB: Unless, you render multiple Angular applications on the same page, setting an application ID is not necessary.
Before:
imports: [
BrowserModule.withServerTransition({ appId: 'serverApp' }),
...
]
After:
imports: [
BrowserModule,
{ provide: APP_ID, useValue: 'serverApp' },
...
],
ApplicationConfig
has moved, please import ApplicationConfig
from @angular/core
instead.
PlatformConfig.baseUrl
and PlatformConfig.useAbsoluteUrl
platform-server config options are deprecated as these were not used.| Commit | Type | Description |
| -- | -- | -- |
| 48aa96ea13 | refactor | remove Angular Compatibility Compiler (ngcc) (#49101) |
| 2703fd6260 | refactor | remove deprecated EventManager
method addGlobalEventListener
(#49645) |
| Commit | Type | Description |
| -- | -- | -- |
| 5dce2a5a3a | feat | Provide MockPlatformLocation by default in BrowserTestingModule (#49137) |
| d47fef72cb | fix | strict type checking for ngtemplateoutlet (#48374) |
| c41a21658c | refactor | remove deprecated XhrFactory
export from http
entrypoint (#49251) |
| Commit | Type | Description |
| -- | -- | -- |
| 1a6ca68154 | feat | add support for compile-time required inputs (#49304) |
| 13dd614cd1 | feat | add support for compile-time required inputs (#49453) |
| 8f539c11f4 | feat | add support for compile-time required inputs (#49468) |
| 79cdfeb392 | feat | drop support for TypeScript 4.8 (#49155) |
| 1407a9aeaf | feat | support multiple configuration files in extends
(#49125) |
| 9de1e9da8f | fix | incorrectly matching directives on attribute bindings (#49713) |
| 6623810e4d | fix | Produce diagnositc if directive used in host binding is not exported (#49527) |
| Commit | Type | Description |
| -- | -- | -- |
| 03d1d00ad9 | feat | Add an extended diagnostic for nSkipHydration
(#49512) |
| ed817e32fe | fix | Catch FatalDiagnosticError during template type checking (#49527) |
| 49fe974501 | perf | optimize NgModule emit for standalone components (#49837) |
| Commit | Type | Description |
| -- | -- | -- |
| 89d291c367 | feat | add assertInInjectionContext
(#49529) |
| 4e9531f777 | feat | add mergeApplicationConfig
method (#49253) |
| d7d6514add | feat | Add ability to configure NgZone
in bootstrapApplication
(#49557) |
| bc5ddabdcb | feat | add Angular Signals to the public API (#49150) |
| 17e9862653 | feat | add API to provide CSP nonce for inline stylesheets (#49444) |
| 605c536420 | feat | add migration to remove moduleId
references (#49496) |
| 99d874fe3b | feat | add support for TypeScript 5.0 (#49126) |
| d1617c449d | feat | allow removal of previously registered DestroyRef callbacks (#49493) |
| b2327f4df1 | feat | Allow typeguards on QueryList.filter (#48042) |
| 061f3d1086 | feat | Drop public factories
property for IterableDiffers
: Breaking change (#49598) |
| fdf61974d1 | feat | drop support for zone.js
versions <=0.12.0
(#49331) |
| 9c5fd50de4 | feat | effects can optionally return a cleanup function (#49625) |
| c024574f46 | feat | expose makeStateKey
, StateKey
and TransferState
(#49563) |
| a5f1737d1c | feat | expose onDestroy on ApplicationRef (#49677) |
| e883198460 | feat | implement takeUntilDestroyed
in rxjs-interop (#49154) |
| 0814f20594 | feat | introduce runInInjectionContext
and deprecate prior version (#49396) |
| 0f5c8003cc | feat | introduce concept of DestroyRef (#49158) |
| 9b65b84cb9 | feat | Mark components for check if they read a signal (#49153) |
| 8997bdc03b | feat | prototype implementation of @angular/core/rxjs-interop (#49154) |
| 585e34bf6c | feat | remove entryComponents (#49484) |
| aad05ebeb4 | feat | support usage of non-experimental decorators with TypeScript 5.0 (#49492) |
| 6d7be42da7 | fix | add newline to hydration mismatch error (#49965) |
| f8e25864e8 | fix | allow async functions in effects (#49783) |
| 84216dabfc | fix | catch errors from source signals outside of .next (#49769) |
| be23b7ce65 | fix | ComponentRef.setInput only sets input when not equal to previous (#49607) |
| 316c91b1a4 | fix | deprecate moduleId
@Component
property (#49496) |
| fd9dcd36cd | fix | Ensure effects can be created when Zone is not defined (#49890) |
| 9180f98f0e | fix | ensure takeUntilDestroyed unregisters onDestroy listener on unsubscribe (#49901) |
| 4721c48a24 | fix | error if document body is null (#49818) |
| 2650f1afc1 | fix | execute input setters in non-reactive context (#49906) |
| f8b95b9da6 | fix | execute query setters in non-reactive context (#49906) |
| ef91a2e0fe | fix | execute template creation in non-reactive context (#49883) |
| 87549af73c | fix | Fix capitalization of toObservableOptions (#49832) |
| 0e5f9ba6f4 | fix | generate consistent component IDs (#48253) |
| fedc75624c | fix | include inner ViewContainerRef anchor nodes into ViewRef.rootNodes output (#49867) |
| df1dfc4c17 | fix | make sure that lifecycle hooks are not tracked (#49701) |
| c34d7e0822 | fix | onDestroy should be registered only on valid DestroyRef (#49804) |
| 2f2ef14f9e | fix | resolve InitialRenderPendingTasks
promise on complete (#49784) |
| c7d8d3ee37 | fix | toObservable should allow writes to signals in the effect (#49769) |
| b4531f1d82 | fix | typing of TestBed Common token. (#49997) |
| a4e749ffca | fix | When using setInput, mark view dirty in same was as markForCheck
(#49711) |
| 9b9c818f99 | perf | change RendererType2.styles
to accept a only a flat array (#49072) |
| 82d6fbb109 | refactor | generate a static application ID (#49422) |
| 3b863ddc1e | refactor | Remove ReflectiveInjector
symbol (#48103) |
| f594725951 | refactor | remove Node.js v14 support (#49255) |
| Commit | Type | Description | | -- | -- | -- | | 07a1aa3004 | feat | Improve typings form (async)Validators (#48679) |
| Commit | Type | Description |
| -- | -- | -- |
| aff1512950 | feat | allow HttpClient
to cache requests (#49509) |
| 15c91a53ae | fix | delay accessing pendingTasks.whenAllTasksComplete
(#49784) |
| 9f0c6d1ed1 | fix | ensure new cache state is returned on each request (#49749) |
| 45a6ac09fd | fix | force macro task creation during HTTP request (#49546) |
| 2a580b6f0b | fix | HTTP cache was being disabled prematurely (#49826) |
| 2eb9b8b402 | fix | wait for all XHR requests to finish before stabilizing application (#49776) |
| Commit | Type | Description |
| -- | -- | -- |
| 5e5dac278d | feat | Migration to remove Router
guard and resolver interfaces (#49337) |
| Commit | Type | Description |
| -- | -- | -- |
| 761e02d912 | feat | add a public API function to enable non-destructive hydration (#49666) |
| 630af63fae | feat | deprecate withServerTransition
call (#49422) |
| 81e7d15ef6 | feat | enable HTTP request caching when using provideClientHydration
(#49699) |
| 74c925c19c | fix | export deprecated TransferState
as type (#50015) |
| 2312eb53ef | fix | KeyEventsPlugin should keep the same behavior (#49330) |
| c934a8e72b | fix | only add ng-app-id
to style on server side (#49465) |
| 9165ff2517 | fix | reuse server generated component styles (#48253) |
| e8e36811d5 | fix | set nonce attribute in a platform compatible way (#49624) |
| 3aa85a8087 | refactor | move ApplicationConfig
to core (#49253) |
| 9bd9a11f4e | refactor | remove deprecated BrowserTransferStateModule
symbol (#49718) |
| Commit | Type | Description |
| -- | -- | -- |
| b5278cc115 | feat | renderApplication
now accepts a bootstrapping method (#49248) |
| 056d68002f | feat | add provideServerSupport
function to provide server capabilities to an application (#49380) |
| 7870fb07fe | feat | rename provideServerSupport
to provideServerRendering
(#49678) |
| a08a8ff108 | fix | bundle @angular/domino in via esbuild (#49229) |
| 5ea624f313 | fix | remove dependency on @angular/platform-browser-dynamic
(#50064) |
| e99460865e | refactor | deprecate useAbsoluteUrl
and baseUrl
(#49546) |
| 41f27ad086 | refactor | remove renderApplication
overload that accepts a component (#49463) |
| 17abe6dc96 | refactor | remove deprecated renderModuleFactory
(#49247) |
| Commit | Type | Description |
| -- | -- | -- |
| ea32c3289a | feat | Expose information about the last successful Navigation
(#49235) |
| 455c728525 | feat | helper functions to convert class guards to functional (#48709) |
| f982a3f965 | feat | Opt-in for binding Router
information to component inputs (#49633) |
| 1f055b90b6 | fix | Ensure anchor scrolling happens on ignored same URL navigations (#48025) |
| 6193a3d406 | fix | fix = not parsed in router segment name (#47332) |
| c0b1b7becf | fix | Remove deprecated ComponentFactoryResolver from APIs (#49239) |
| 1e32709e0e | fix | remove RouterEvent from Event union type (#46061) |
| 3c7e637374 | fix | Route matching should only happen once when navigating (#49163) |
| 1600687fe5 | fix | Route matching should only happen once when navigating (#49163) |
| 31f210bf2c | fix | Router.createUrlTree should work with any ActivatedRoute (#48508) |
| Commit | Type | Description | | -- | -- | -- | | 5e7fc259ea | feat | add function to provide service worker (#48247) |
<!-- CHANGELOG SPLIT MARKER --><a name="15.2.9"></a>
Changelog
15.2.0 (2023-02-22)
InjectionToken
guards and resolvers are
deprecated. Instead, write guards as plain JavaScript functions and
inject dependencies with inject
from @angular/core
.| Commit | Type | Description | | -- | -- | -- | | 926c35f4ac | docs | Deprecate class and InjectionToken and resolvers (#47924) |
| Commit | Type | Description | | -- | -- | -- | | 54b24eb40f | feat | Add loaderParams attribute to NgOptimizedImage (#48907) |
| Commit | Type | Description | | -- | -- | -- | | 0cf11167f1 | fix | incorrectly detecting forward refs when symbol already exists in file (#48988) |
| Commit | Type | Description | | -- | -- | -- | | a154db8a81 | feat | add ng generate schematic to convert declarations to standalone (#48790) | | 345e737daa | feat | add ng generate schematic to convert to standalone bootstrapping APIs (#48848) | | e7318fc758 | feat | add ng generate schematic to remove unnecessary modules (#48832) |
| Commit | Type | Description | | -- | -- | -- | | 4ae384fd61 | feat | Allow auto-imports of a pipe via quick fix when its selector is used, both directly and via reexports. (#48354) | | 141333411e | feat | Introduce a new NgModuleIndex, and use it to suggest re-exports. (#48354) | | d0145033bd | fix | generate forwardRef for same file imports (#48898) |
| Commit | Type | Description |
| -- | -- | -- |
| 2796230e95 | fix | add enum
in mode
option in standalone
schema (#48851) |
| 816e76a578 | fix | automatically prune root module after bootstrap step (#49030) |
| bdbf21d04b | fix | avoid generating imports with forward slashes (#48993) |
| 32cf4e5cb9 | fix | avoid internal modules when generating imports (#48958) |
| 521ccfbe6c | fix | avoid interrupting the migration if language service lookup fails (#49010) |
| a40cd47aa7 | fix | avoid modifying testing modules without declarations (#48921) |
| 1afa6ed322 | fix | don't add ModuleWithProviders to standalone test components (#48987) |
| c98c6a8452 | fix | don't copy animations modules into the imports of test components (#49147) |
| 8389557848 | fix | don't copy unmigrated declarations into imports array (#48882) |
| f82bdc4b01 | fix | don't delete classes that may provide dependencies transitively (#48866) |
| 759db12e0b | fix | duplicated comments on migrated classes (#48966) |
| ba38178d19 | fix | generate forwardRef for same file imports (#48898) |
| 03fcb36cfd | fix | migrate HttpClientModule to provideHttpClient() (#48949) |
| 2de6dae16d | fix | migrate RouterModule.forRoot with a config object to use features (#48935) |
| 770191cf1f | fix | migrate tests when switching to standalone bootstrap API (#48987) |
| c7926b5773 | fix | move standalone migrations into imports (#48987) |
| 65c74ed93e | fix | normalize paths to posix (#48850) |
| 6377487b1a | fix | only exclude bootstrapped declarations from initial standalone migration (#48987) |
| e9e4449a43 | fix | preserve tsconfig in standalone migration (#48987) |
| ffad1b49d9 | fix | reduce number of files that need to be checked (#48987) |
| ba7a757cc5 | fix | return correct alias when conflicting import exists (#49139) |
| 49a7c9f94a | fix | standalone migration incorrectly throwing path error for multi app projects (#48958) |
| 584976e6c8 | fix | support --defaults in standalone migration (#48921) |
| 03f47ac901 | fix | use consistent quotes in generated imports (#48876) |
| ebae506d89 | fix | use import remapper in root component (#49046) |
| 40c976c909 | fix | use NgForOf instead of NgFor (#49022) |
| 4ac25b2aff | perf | avoid re-traversing nodes when resolving bootstrap call dependencies (#49010) |
| 26cb7ab2e6 | perf | speed up language service lookups (#49010) |
| Commit | Type | Description | | -- | -- | -- | | bf4ad38117 | fix | remove styles from DOM of destroyed components (#48298) |
| Commit | Type | Description | | -- | -- | -- | | 25e220a23a | fix | avoid duplicate TransferState info after renderApplication call (#49094) |
| Commit | Type | Description | | -- | -- | -- | | 31b94c762f | feat | Add a withNavigationErrorHandler feature to provideRouter (#48551) | | dedac8d3f7 | feat | Add test helper for trigger navigations in tests (#48552) |
Alan Agius, Alex Castle, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Dylan Hunn, Ikko Eltociear Ashimine, Ilyass, Jessica Janiuk, Joey Perrott, John Manners, Kalbarczyk, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Virginia Dooley, Walid Bouguima, cexbrayat and mgechev
<!-- CHANGELOG SPLIT MARKER --><a name="15.1.5"></a>
Changelog
15.1.0 (2023-01-10)
CanLoad guards in the Router are deprecated. Use CanMatch instead.
router writable properties
The following strategies are meant to be configured by registering the
application strategy in DI via the providers
in the root NgModule
or
bootstrapApplication
:
routeReuseStrategy
titleStrategy
urlHandlingStrategy
The following options are meant to be configured using the options
available in RouterModule.forRoot
or provideRouter
.
onSameUrlNavigation
paramsInheritanceStrategy
urlUpdateStrategy
canceledNavigationResolution
The following options are available in RouterModule.forRoot
but not
available in provideRouter
:
malformedUriErrorHandler
- This was found to not be used anywhere
internally.errorHandler
- Developers can instead subscribe to Router.events
and filter for NavigationError
.| Commit | Type | Description | | -- | -- | -- | | fe50813664 | feat | Add BrowserPlatformLocation to the public API (#48488) | | 2f4f0638c7 | fix | Add data attribtue to NgOptimizedImage (#48497) |
| Commit | Type | Description | | -- | -- | -- | | a532d71975 | feat | allow self-closing tags on custom elements (#48535) | | caf7228f8a | fix | resolve deprecation warning (#48652) | | 33f35b04ef | fix | type-only symbols incorrectly retained when downlevelling custom decorators (#48638) |
| Commit | Type | Description |
| -- | -- | -- |
| caedef0f5b | fix | update @babel/core
dependency and lock version (#48634) |
| Commit | Type | Description |
| -- | -- | -- |
| 6acae1477a | feat | Add TestBed.runInInjectionContext
to help test functions which use inject
(#47955) |
| 38421578a2 | feat | Make the isStandalone()
function available in public API (#48114) |
| dd42974b07 | feat | support TypeScript 4.9 (#48005) |
| Commit | Type | Description | | -- | -- | -- | | 8aa8b4b77c | fix | Form provider FormsModule.withConfig return a FormsModule (#48526) |
| Commit | Type | Description |
| -- | -- | -- |
| 5f0b53c735 | feat | Allow auto-imports to suggest multiple possible imports. (#47787) |
| 6a8ea29a04 | fix | expose package.json
for vscode extension resolution (#48678) |
| ce8160ecb2 | fix | Prevent crashes on unemitable references (#47938) |
| e615b598ba | fix | ship /api
entry-point (#48670) |
| 6ce7d76a0e | fix | update packages/language-service/build.sh script to work with vscode-ng-language-service's new Bazel build (#48663) |
| Commit | Type | Description |
| -- | -- | -- |
| a1a8e91eca | fix | add triple slash type reference on @angular/localize
on `ng add (#48502) |
| Commit | Type | Description | | -- | -- | -- | | cc284afbbc | fix | combine newly-added imports in import manager (#48620) |
| Commit | Type | Description |
| -- | -- | -- |
| 228e992db7 | docs | Deprecate canLoad guards in favor of canMatch (#48180) |
| 0a8b8a66cd | docs | Deprecate public members of Router that are meant to be configured elsewhere (#48006) |
| 332461bd0c | feat | Add ability to override onSameUrlNavigation
default per-navigation (#48050) |
| f58ad86e51 | feat | Add feature provider for enabling hash navigation (#48301) |
| 73f03ad2d2 | feat | Add new NavigationSkipped event for ignored navigations (#48024) |
| 3fe75710d9 | fix | page refresh should not destroy history state (#48540) |
Alan Agius, Alex Castle, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Bob Watson, Charles Lyding, Derek Cormier, Doug Parker, Dylan Hunn, George Kalpakas, Greg Magolan, Jessica Janiuk, JiaLiPassion, Joey Perrott, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Renan Ferro, Tim Gates, Vadim, Virginia Dooley, ced, mgechev, piyush132000, robertIsaac and sr5434
<!-- CHANGELOG SPLIT MARKER --><a name="15.0.4"></a>
Changelog
15.0.2 (2022-11-30)
| Commit | Type | Description | | -- | -- | -- | | 86a21f5569 | fix | accept inheriting the constructor from a class in a library (#48156) |
Alan Agius, Andrew Scott, Aristeidis Bampakos, Bob Watson, Derek Cormier, JoostK, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Rokas Brazdžionis, mgechev and piyush132000
<!-- CHANGELOG SPLIT MARKER --><a name="15.0.1"></a>