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">
  <meta charset="utf-8">
  <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=""

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) {

  .catch(err => console.error(err));​

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