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 app module

In the preceding section, we created an Angular component named AppComponent. Now we need to bootstrap this AppComponent so that Angular will consider this as a root component of the application. We can bootstrap a component by decorating an AppModule class with the NgModule and adding the metadata bootstrap assigned with AppComponent. Follow these steps to create AppModule:

  1. Create a TypeScript by right-clicking on the app folder and navigating to Add | New Item. Select Scripts under Web from the left-hand side pane and select TypeScript File from the middle pane. Add a file named app.module.ts, and click on Add:
Adding ...

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