Activity 9: Angular Basic Routing

This is a step by step guide on how to make a basic routing in Angular

Step #1 - Creating a New Repository name AngularBasicRouting

Step #2 - Create a Components Folder inside Angular Files

Step #3 - Go to your angular folder files and create 4 components to create a components do this ng generate component foldername/filename

Step #4 - Now create a app.module.ts file in your Angular Files

Step #5 - Follow this code

Step #6 - Go to your app.component.ts file and delete standalone and imports code and also import RouterOutlet

Step #7 -Make a routes path

Step #8 - Go to components folder and go to every components folder and delete all the standalone and imports on every components typescript

Step #9 - Add the declarations on every components

Step #10 - Change the main typescript to this code

Step #12 - Now go to the Angular folder files using Command Prompt and run the ng serve command to run the app and this will be the result

Step #13 - Lastly, Push the project on you’re Github Repository

https://github.com/BrandonLCanete/AngularBasicRouting.git

0
Subscribe to my newsletter

Read articles from Cañete,Brandon L. directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Cañete,Brandon L.
Cañete,Brandon L.