No APIs, no forms, no state. Just routing. A clean, step-by-step demo for anyone starting with Angular.
1.In the terminal, type in and make the next components:
**ng generate component home
ng generate component about
ng generate component contact**
Result:

**2.** Configure app-routing.module.ts
typescript
Result:

`
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { AboutComponent } from './about/about.component';
import { ContactComponent } from './contact/contact.component';
const routes: Routes = [
{ path: '', component: HomeComponent },
{ path: 'about', component: AboutComponent },
{ path: 'contact', component: ContactComponent }
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }`
**3.** Add navigation to app.component.html
html
**4.** Content of pages (minimal but clear)
🏠 home.component.html
html
Home
This is the home page.
Angular routing demo — show content change without refreshing.
</div
ℹ️ about.component.html
html
About
Ova stranica demonstrira Angular routing.
Klik na link → promjena sadržaja.
📞 contact.component.html
html
Contact
Kontakt stranica — treća ruta u aplikaciji.
Routing je osnova svakog SPA-a.
In the end, you should see.

Top comments (0)