What happens when an Angular application starts?
Model answer
The browser loads index.html, which contains the root element (for example app-root) and the built JavaScript bundles. main.ts calls bootstrapApplication with the root component and the app configuration. Angular creates the root component, renders its template into the root element, sets up the router, and the first route's component appears.
From then on Angular reacts to events and data changes and updates the screen.
Learn this topic
Angular Tutorial: Beginner to Advanced .
Sign in to add your own answer.
More questions
- What is Angular, and how is it different from AngularJS?
- What is a single-page application (SPA)?
- What does the Angular CLI do? Name some common commands.
- What is a standalone component, and why did Angular move away from NgModules?
- What is TypeScript, and why does Angular use it?
- Describe the structure of a basic Angular project.