ACTIVITY 7: Angular Basic Routing

ACTIVITY 7: Angular Basic Routing

CREATE REPOSITORY

  1. Repository Setup: Named AngularBasicRouting

  2. Create Four Components: login, signup, homepage, and landing page.

    • Implement basic functionality and structure for each component using HTML and TypeScript only (no design or CSS required).
  3. Set Up Routing: Set up Angular routing to navigate between the login, signup, homepage, and landing page components.

    • Creating new Folder named AngularAct with packages.

If you are out of the folder, you may put a cd AngularAct to add to your directory path specifically. dir means show list of files and all included packages in a specific directory or in short, in AngularAct folder.

  • ng serve command will serve you a service and build locally such as provide a localhost wherein it displays of what components in ide or apps changes in our/your codes.

  • This is a real time for development environment allowing us to display all the changes as work in our site or application.

  • This is a PowerShell command inside of the Folder AngularAct.

  • ng generate components components/login and so on is a command wherein you already have a folder named components and you want to direct your modules such as login, signup, homepage, and landing page in the components folder under of the app.

  • you can do “ng generate component login, and so on but the best practices especially to more organized is the first one.

  • THE ACTUAL:

  • In our Activity, this code above is a routes that necessarily need to connect login, signup, homepage, and landing page modules and display to the angular.

  • The path corresponding the ‘‘is shows on the title bar with a slash.

  • Also, the component with corresponding of the different components is more important since this will base what inside of their components shows.

    • This is in the app.component.html. This the connection between the path and routerlink.

    • If you don’t mind. the slash in the first in home page is different from others for the reason that this is the default when the angular display.

  • Additionally, In the app.module.ts you need import provided in below to function and display the inputs.

  • OUTPUT:

  • This is the commands to put from the local to remote repository.

  • Git init commands use to initialize a new git repository in our project repository.

  • Git add . is command to include all the files staging area, you can git add specifically for instance git add Helloworld.txt, but in a larger files dot(.) is good.

  • git branch -m main when the current branch rename into main.

  • git remote add origin commands is to link our project local repository into a remote repository or GitHub.

  • git push -u origin main commands use to push from your local into your remote repository specifically in GitHub.

  • git status shows what current state of your project.

  • git log commands show the changes or in short history of project.

  • OUTPUT

  • https://github.com/Rhedaligan8/AngularBasicRouting.git

EXAMPLE VIDEO THAT ACTIVITY IS WORKING!