How an angular app gets loaded and started?

Của willnguyen trong Angular 8
Angular is a single page application so that it has:
  • index.html as single page.
  • main.ts as the main functionality for js.
This is index.html
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Itviec</title>
  <base href="/">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/png" href="assets/favicon-96x96.png" sizes="96x96">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
        rel="stylesheet">
</head>
<body>
  <app-root></app-root>
</body>
</html>
​

This is main.ts
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

if (environment.production) {
  enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule)
  .catch(err => console.error(err));​

bootstrapModule means this module will be started first - bootstrap.
Angular would compile all of components to a bundle.js