In this section, we are going to learn how to work with components. We are going to learn how to work to implement components and routing, as well as other concepts such as how to implement dependency injection in an Angular application.
Working with Angular components
Our first component
In this section, we are going to look at our first Angular component. Earlier in this chapter, we learned how to bootstrap an Angular application, and we used the AppModule. Later, we learned that the AppModule uses the AppComponent as the root component of our application. We will now look at the AppComponent:
import { Component } from "@angular/core"; @Component({ selector: "app-root", template: ` ...