title: Angular routerLink does not trigger ngOnInit
body: <p>This is the ngOnInit in the componet.ts file </p>
  
  <pre><code>ngOnInit() {
        this.locationService.getLocation().subscribe( locations =&gt; {
        this.locations = locations;
      });
    }
  </code></pre>
  
  <pre><code>&lt;a [routerLink]="['/locations-list']"&gt;
  </code></pre>
  
  <p>when I use a <code>[routerLink]</code> to navigate to the above component it navigates to the component and load the view, but it does not trigger above <b>ngOnInit</b> method. But if I refresh the page it works fine.
  <br>
  Is there any fix for above problem.</p>
  
  <p>Already I used <code>href</code> to navigate to pages and with <code>href</code> above method works fine always but its very slow. That's why I changes <code>href</code> to <code>[routerLink]</code>.</p>
  
  <p>This is the component.html that contains the view</p>
  
  <pre><code>                &lt;div class="table-responsive"&gt;
                    &lt;table class="table"&gt;
                      &lt;thead class=" text-primary"&gt;
                        &lt;th&gt;
                          Location Name
                        &lt;/th&gt;
  
                      &lt;/thead&gt;
                      &lt;tbody *ngIf="locations?.length &gt; 0"&gt;
                        &lt;tr *ngFor="let location of locations"&gt;
                          &lt;td *ngIf="location.verified != false"&gt;
                            {{location.locationName}}
                          &lt;/td&gt;
                        &lt;/tr&gt;
                      &lt;/tbody&gt;
                    &lt;/table&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
  </code></pre>