Angular 10

Bootstrapping of Angular 9

  1. Do put bootstrapping and platform logic for the app in a file named main.ts.
  2. Do include error handling in the bootstrapping logic.
  3. Avoid putting app logic in main.ts. Instead, consider placing it in a component or service.

Example looks like -
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule }              from './app/app.module';

platformBrowserDynamic().bootstrapModule(AppModule)
  .then(success => console.log(`Bootstrap success`))
  .catch(err => console.error(err));

ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

www.code-sample.com/. Powered by Blogger.
^