title: ngOnInit not firing one change between children routes
body: <p>My app is set up to filter different projects when links are clicked at the top. This done by taking in a route param and then passing it to my component. My component then filters a db query OnInit based on the provided param. This all works fine but the issue I'm running into is the ngOnInit isn't being fired when I move between child routes. </p>
  
  <p>ngDoCheck seems like the thing I'd need to use but this is being fired when the app is being loaded and breaking my code because the projectService isn't completed. Is there a way to force ngDoCheck to wait until the project is loaded before it starts listening? The Angular website states it should already do this but from what I'm seeing it isn't.</p>
  
  <p>Any advice on how I should be implementing this correctly?</p>
  
  <p>Component</p>
  
  <pre><code>  ngOnInit() {
      this.paramsSub = this.activatedRoute.params.subscribe(params =&gt; this.pageCategory = params['id']);
      this.getProjects();
    }
  
    getProjects() {
      if (this.pageCategory) {
        this.projectService.getProjects()
          .subscribe(
          projects =&gt; this.projects = projects.filter(project =&gt; project.category.includes(this.pageCategory)),
          error =&gt; this.errorMessage = &lt;any&gt;error);
      } else {
        this.projectService.getProjects()
          .subscribe(
          projects =&gt; this.projects = projects,
          error =&gt; this.errorMessage = &lt;any&gt;error);
      }
    }
  </code></pre>
  
  <p>Routes </p>
  
  <pre><code>const routes: Routes = [
    { path: '',
      children: [{
        path: ':id',
        component: HomeComponent,
      }]
    },
    { path: '', component: HomeComponent },
    { path: '**', redirectTo: '', pathMatch: 'full' }
  ];
  </code></pre>