Questions & Answers

Pages Shown up but Texts are not display Angular

i am a beginner of angular.i am creating a small website on angular.i set routes successfully.but when i click the url links goes to the paticular page but text are not visible i don't why what i tried so far i attached below.

Routes Sections

const routes: Routes = [
  {path: '', component: IndexComponent},
  {path: '/about', component: AboutComponent},
  {path: '/contact', component: ContactComponent}


<div class="container">
  <div class="row">
      <div class="col-md-12">

<div class="row">
  <div class="col-md-3">
      <ul class="list-group">
          <a href="/" class="list-group-item">Index</a>
          <a href="/about" class="list-group-item">About</a>
          <a href="/contact" class="list-group-item">Contact</a>



<p>about works!</p>


<p>contact works!</p>
2023-01-23 08:42:04
I think you need to use routerLink instead of href.
2023-01-23 08:42:04
<a routerLink ="/" class="list-group-item">Index</a> i used like this way but now links are not shown up
Answers(0) :