# Angular Basic Routing

### **1\. Create a New Repository**

Name your repository `AngularBasicRouting`.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726583112938/db55f4ba-651a-48aa-bc3b-a7069cfab4f9.png align="center")

### **2\. Create a New Angular Project**

![No description available.](https://scontent.fmnl17-4.fna.fbcdn.net/v/t1.15752-9/459384676_1322841078546985_97763883126748198_n.png?_nc_cat=105&ccb=1-7&_nc_sid=9f807c&_nc_ohc=md6A8QD7x08Q7kNvgHn8kNV&_nc_ht=scontent.fmnl17-4.fna&oh=03_Q7cD1QF1S_aClcT3p_R2kiMHPwRbRGXA1QDTW6PoLzB_1oWWLg&oe=6710FF0E align="left")

### **3\. Generate Components**

  
Using Angular CLI, generate the following components:  
  
Terminal Command:

ng generate component homepage  
ng generate component landing-page  
ng generate component login  
ng generate component sign-up

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726583421261/268511cb-eaac-43fc-b052-227a073e9bd5.png align="center")

### **4\. Implement Basic Functionality**

  
Homepage Component (`homepage.component.html`):

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726583717631/91f36130-1035-494e-8b69-c6752d4c83d9.png align="center")

Login Component (`login.component.html`):

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726583677083/ea148e55-beaa-4134-99b8-04862646130c.png align="left")

Services Component (`services.component.html`):

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726583790227/382def5b-7eb3-486b-a14f-e45969eace24.png align="left")

###   
5\. Set Up Routing

  
**Update** `app-routing.module.ts`

Open `src/app/app-routing.module.ts` and configure the routes for your components. Replace the default code with the following:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726584494819/de543edd-1bc4-4d38-9624-dcdbfcc01eb7.png align="center")

Update `app.component.html`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726584790175/75f3812b-253b-4233-b9ff-46b83cce6411.png align="center")

###   
7\. Output  

%[https://gist.github.com/Fieeeshie/527490ff95f919df7622c739ce05065d] 

### GITHUB  
LINK:[https://github.com/Fieeeshie/AngularBasicRouting](https://github.com/Fieeeshie/AngularBasicRouting)
