O'Reilly logo

Learning Angular for .NET Developers by Rajesh Gunasundaram

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding an Angular component

Now we need to bootstrap the AppModule created in the preceding section. Perform the following steps:

  1. Let's create a TypeScript file, main.ts, to bootstrap AppModule. Right-click on the wwwroot folder and navigate to Add | New Item. Select Scripts under Web on the left-hand side pane and select TypeScript File from the middle pane. Name the file as main.ts, and click on Add:
Adding the TypeScript file named main.ts
  1. Update the main.ts file with this code snippet:
      import { platformBrowserDynamic }   from       '@angular/platform-      browser-dynamic';         import { AppModule } from './app/app.module';    platformBrowserDynamic().bootstrapModule(AppModule); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required