From the course: Building Angular and ASP.NET Web API Apps

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Adding a component

Adding a component

From the course: Building Angular and ASP.NET Web API Apps

Start my 1-month free trial

Adding a component

- [Instructor] The core concept of any Angular application is the component. The whole application can be modeled as a tree of these components. Components are basically TypeScript classes that interact with the HTML files. And the HTML files are the files that are going to be displayed to the users. So, in an Angular application, we can separate each feature into a separate component. In our application, the first thing that we see are the header, the footer, and the body, or the placeholder where we are going to show the data. So we're going to have different components for each feature. In our application, here we have the header, then we have the body where we show all the data, and we have the footer. Each of them will be created as a separate component. To create components or services, we have said that we are going to use the Angular CLI. And to create a component using the Angular CLI, we are going to use this command. So ng generate component, and then you'll define the name…

Contents