Navigation အတွက် <a> tag အစား routerLink directive ကိုသုံးသည်။
<router-outlet> directive သည် Angular router က activated component ကို မည်သည့်နေရာတွင် ပြသရမည်ကို ပြောပြသော placeholder ဖြစ်သည်။
typescript
<nav>
<a routerLink="/home">Home</a>
<a routerLink="/about">About</a>
</nav>
<router-outlet></router-outlet>
// app-routing.module.ts
const routes: Routes = [
{ path: 'home', component: HomeComponent },
{ path: 'about', component: AboutComponent }
];You should see
(Home နှင့် About links များကိုနှိပ်လျှင် page refresh မဖြစ်ဘဲ သက်ဆိုင်ရာ component ၏ content ပြောင်းလဲသွားမည်)