PLATFORM_INITIALIZER is Angular’s deprecated platform-level initialization token. Since Angular 19, use providePlatformInitializer for platform setup; use provideAppInitializer when initialization belongs to an individual application. The distinction matters because the APIs run at different injector scopes, and only the app initializer is documented to wait for a returned Promise or Observable.
What PLATFORM_INITIALIZER does
PLATFORM_INITIALIZER represents callbacks that run when Angular initializes the platform injector. Angular describes the platform as the entry point for a page; its injector is the parent injector for every Angular application on that page. That makes this token appropriate for work associated with the platform rather than setup belonging to one application. See Angular’s PLATFORM_INITIALIZER API and PlatformRef API.
As an Amazon Associate I earn from qualifying purchases.
The token’s documented type is InjectionToken<readonly (() => void)[]>. Angular marks it deprecated since v19.0 and names providePlatformInitializer as its replacement.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteHow to migrate to providePlatformInitializer
Replace a PLATFORM_INITIALIZER registration with providePlatformInitializer, and register the helper as part of platform creation. Angular documents the helper as a () => void callback that runs in an injection context.
#1 Best Overall
import { providePlatformInitializer } from '@angular/core';
import { platformBrowser } from '@angular/platform-browser';
const platformRef = platformBrowser([
providePlatformInitializer(() => {
// Platform-level setup
}),
]);
This follows Angular’s documented registration point: the initializer is passed to platformBrowser([...]) while creating the platform. The resulting platform reference can then be used to bootstrap an application. Consult the providePlatformInitializer API for the current signature and example.
Choose the initializer by scope
| API | Scope and registration | Completion behavior |
|---|---|---|
providePlatformInitializer |
Platform injector; register during platform creation. | Documented callback type is () => void; the API documentation does not describe waiting for an asynchronous result. |
provideAppInitializer |
Application startup; provide it in application providers. | If the callback returns a Promise or Observable, Angular waits for it to resolve or complete before finishing application initialization. |
Use the app-level helper for tasks such as loading language data or external configuration needed by a particular application. Angular marks the older APP_INITIALIZER token deprecated since v19.0 in favor of provideAppInitializer; it is not the direct replacement for platform initialization. See provideAppInitializer and APP_INITIALIZER.
Rank #2
Does a platform initializer wait for asynchronous work?
Do not treat providePlatformInitializer as an asynchronous startup barrier based on its documented API. Angular specifies a void-returning callback and does not document awaiting a Promise or Observable for this helper. If application startup must wait for asynchronous work, use provideAppInitializer and return the Promise or Observable from its callback.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Quick Recap
Rank #4
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




