Creating Our First Component
Explore the fundamentals of Angular components by learning their structure, how to create them using the Angular CLI, and the importance of registering components with Angular modules. Understand how components interact within an application to build modular, reusable user interfaces.
We'll cover the following...
Components are the basic building blocks of an Angular application. They control different parts of a web page called views, such as a list of products or an order checkout form. Views are responsible for the presentational logic of an Angular application, and they are organized in a hierarchical tree of components that can interact with each other:
The architecture of an Angular application is based on Angular components. Each Angular component can communicate and interact with one or more components in the component tree. As we can see in the previous diagram, a component can simultaneously be a parent of some child components and a child of another parent component.
In this lesson, we will explore the following topics about Angular components:
• The structure of an Angular component
• Registering components with modules
• Creating standalone components
We will start our journey by investigating the ...