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

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Define and creating empty components

Define and creating empty components

- [Instructor] In this part, we're going to create the Angular components, and we have said that to create a component, we are going to use the Angular CLI, and for that the command is ng generate component and then the component name. Now, before we create a component, it's really important to know that an Angular component is a fundamental building block of an Angular application consisting of a TypeScript class, an HTML template, and an optional CSS styles file. All these files together define a usable piece of the user interface with its own logic and data. So basically every feature in an Angular app, or any reusable part of the app needs to be created as a separate component, and in our app, we do have multiple sections that we can create as a component, like for example, the header of the app. We can create a component for that. The folder, the login. The signup page can also be a component, or the transaction, so whenever we create a transaction or we edit a transaction, we…

Contents