Skip to content

Latest commit

 

History

History
74 lines (54 loc) · 1.28 KB

File metadata and controls

74 lines (54 loc) · 1.28 KB

Picsum

This project was generated with Angular CLI version 18.2.6.

Prerequisites

It would be good to have some experiences in :-

  • HTML and Css
  • Javascript / Typescript
  • A sample landing

Installation

Learn about installation on the documentation

npm install -g @angular/cli

After installing check the version of angular to be sure

ng version

Currently we are at Angular 19

Components

Components are the building blocks of angular. For each component generated you get a

  • Typescript file
  • Html file ( Template)
  • Styling File
  • Spec file ( Testing)

To generate a component run ng g c componentName

Read More about components

Routing

Routing is like a compass in Angular Routing is handled my RoutingModule

<!-- app.component.html -->
<router-outlet></router-outlet>

Router Outlet is what load the routes written in the app.component.ts

Normal routing

{
   path: string,
   component:ComponentName
}

Default Redirecting

{
   path:string
   pathMatch: string 
   redirectUrl:string
}

Page Not Found

{
   path:"**",
   component:ComponentName
}