The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Angular NG0403 means the NgModule passed to bootstrapModule() has no root component to start and no manual bootstrap hook. For conventional startup, add the intended root component to that module’s nonempty bootstrap array. If the module deliberately controls startup itself, implement ngDoBootstrap() instead.
What causes Angular NG0403?
Angular raises NG0403 when the @NgModule used for application startup has a missing or empty bootstrap property and its class does not implement ngDoBootstrap(). The error is about startup configuration in the bootstrapped module—not a missing template import. Angular’s NG0403 guidance demonstrates both an omitted property and an empty array as error cases.
As an Amazon Associate I earn from qualifying purchases.
In a typical NgModule application, bootstrapModule() receives the module that declares the application’s root component. Angular uses the module’s bootstrap metadata to determine which component to start. See the NgModule API.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchFix NG0403 with a root component
For conventional application startup, list the intended root component in the bootstrap array of the exact module passed to bootstrapModule():
#1 Best Overall
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule],
bootstrap: [AppComponent],
})
export class AppModule {}
platformBrowser().bootstrapModule(AppModule);
Replace AppComponent and AppModule with the component and module your application actually uses. The component must be a valid bootstrap component for the Angular version and component model in the project. Angular’s NgModules guide says components listed in bootstrap are automatically included in the module’s declarations.
When to use ngDoBootstrap()
Implement ngDoBootstrap() when the module intentionally manages component startup manually rather than relying on a fixed root component in metadata. Angular documents this hook as the alternative to a nonempty bootstrap array for resolving NG0403.
Rank #2
Choose based on the application’s startup design: use the array for conventional, declarative startup; use the hook only when module code is meant to control startup. Don’t add an arbitrary component or empty hook merely to silence the error.
Check the module Angular actually starts
- Find the call to
bootstrapModule(...)in the application entry point and note the exact module passed to it. - Open that module’s
@NgModulemetadata. Confirm thatbootstrapcontains the intended root component, or that the module class implementsngDoBootstrap(). - If the configuration appears correct but NG0403 persists, check whether you edited the same module that the entry point bootstraps, and whether the running application uses the expected entry point and build.
Does fixing NG0403 require migrating away from NgModules?
No. An existing application that calls bootstrapModule() can address this error by configuring its bootstrapped module with a root component or the manual hook. Migration is a separate architectural decision. Angular recommends bootstrapApplication() instead of bootstrapModule() for new code, while continuing to document NgModules for understanding existing applications; see the NgModules guide.
Rank #3
Angular’s core application reference tests also cover the error when both bootstrap mechanisms are absent and the automatic startup of a component listed in @NgModule.bootstrap.
Quick Recap
Rank #4
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.




