angular/aio/content/errors/NG05104.md
Quentin b63354e3d9 docs: fix typo (#52247)
Fix word: corresponding

PR Close #52247
2023-10-18 11:29:35 +02:00

768 B

@name Root element was not found. @category runtime @shortDescription Root element was not found during bootstrap.

@description Boostraped components are defined in the bootstrap property of an @NgModule decorator or as the first parameter of boopstrapApplication for standalone components.

This error happens when Angular tries to boostrap one of these components but cannot find its corresponding node in the DOM.

@debugging

This issue occurs when the selector mismatches the tag

@Component({
  selector: 'my-app',
  ...
})
class AppComponent {}
<html>
    <app-root></app-root> <!-- Doesn't match the selector -->
</html>

Replace the tag with the correct one:

<html>
    <my-app></my-app> <!-- OK -->
</html>