---
title: "how to create component in angular 8"  
description: "how to create component in angular 8"  
author: "Anonymous User"  
published: 2020-12-01  
updated: 2020-12-01  
canonical: https://www.mindstick.com/forum/156183/how-to-create-component-in-angular-8  
category: "angular js"  
tags: ["angular js"]  
reading_time: 1 minute  

---

# how to create component in angular 8

how to create [component](https://www.mindstick.com/articles/12262/learn-how-to-make-a-component-in-magento-2) in [angular](https://www.mindstick.com/articles/13081/advantages-disadvantages-of-angularjs-is-that-ideal-for-your-project) 8

## Replies

### Reply by Anonymous User

Here, I will show you how to generate a new component in Angular 8 App using CLI command. We will create new component using ng generate command in Angular 8. So you will understand to Angular 8 ng generate new component command.

So, basically, when you are creating a new component using Angular CLI command then they will create new folder with four files and also they will register in moduler.ts file.

In this example, we will run command and let's see which files created and what you have to write on that file code. You can easily understand to generate new component in Angular 8 application.

## Go to Terminal: Click new Terminal:

![how to create component in angular 8](https://www.mindstick.com/mindstickforums/5de0b5b8-115b-4862-8500-21db460aaf83/images/9897a5f9-eb15-4f47-a83a-1804af1f87de.png) **\**

## in terminal window write the following code

```
ng g component Login
```

![how to create component in angular 8](https://www.mindstick.com/mindstickforums/5de0b5b8-115b-4862-8500-21db460aaf83/images/64666c54-b6df-4d7a-abd4-7708dc7819d8.png) **\**

**now explore the solution and see generated componets.**

![how to create component in angular 8](https://www.mindstick.com/mindstickforums/5de0b5b8-115b-4862-8500-21db460aaf83/images/3adff4f8-f2ae-4fe0-8ee5-666007a6e826.png) **\**

i hope it will help to you..

## \


---

Original Source: https://www.mindstick.com/forum/156183/how-to-create-component-in-angular-8

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
