title: why angular child route not rendering component except first time?
body: <p>I have few component in my angular project. And child route to render those component in one special component. When I click to route it render component for the first time. But after that it only change url parameter but not rendering any component.</p>
  
  <p>Here is my code,</p>
  
  <p>course.component.html</p>
  
  <pre><code>&lt;div *ngIf="courses"&gt;
    &lt;a *ngFor="let course of courses" class="btn btn-danger" color="warn" routerLink="{{ course.id }}"&gt;{{ course.title }}&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>course.component.ts</p>
  
  <pre><code>segmentId: Object;
  courses: Object;
  meta_data: any;
  showSpinner: boolean = true;
  
  constructor(private route: ActivatedRoute, private data: DataService, private seo: SeoService) {
  
  }
  
  ngOnInit() {
      this.segmentId = this.route.snapshot.params['segment'];
      this.route.params.subscribe((params: Params) =&gt; {
          this.segmentId = params.segment
      });
  
      this.data.getCourses(this.segmentId).subscribe(data =&gt; {
          this.courses = data[0].courses;
  
          this.meta_data = data[0];
  
          this.showSpinner = false;
  
          //console.log( this.courses )
          //console.log( this.meta_data.segmentName )
      })
  }
  </code></pre>