title: Fragment Routing after Page Load Angular
body: <p>I would like to use fragment routing to a page in my navigation. Actually it works fine if the page is fully loaded. Unfortunatelly it does not scroll to the correct position if the page is not yet fully loaded.</p>
  
  <p>This is the code I have adjusted in the app-routing.module.ts:</p>
  
  <pre><code>  imports: [RouterModule.forRoot(routes,
      {
        // configure Router module to handle anchor scrolling with fragment
        anchorScrolling: 'enabled',
        onSameUrlNavigation: 'reload',
        scrollPositionRestoration: 'enabled',
        scrollOffset: [0, 80],
      })],
    exports: [RouterModule]
  </code></pre>
  
  <p>This is the anchor-tag in my navigation:</p>
  
  <pre><code>&lt;a class="dropdown-item" routerLink="leistungen" fragment='DigitalFramework'&gt;Digitale Methoden | Digitalisierung&lt;/a&gt;
  </code></pre>
  
  <p>And finally the section I would like to scroll:</p>
  
  <pre><code>&lt;section id="DigitalFramework"&gt;&lt;/section&gt;
  </code></pre>
  
  <p>This code works fine when I have loaded the page already, if this is not the case I do not scroll to the position I would like to come.</p>
  
  <p>The question is how do I initiate the anchor scrolling only if the page is fully loaded?</p>