title: Angular - Button Scroll to Top
body: <p>I developed an image gallery. Is there a way when scrolling on the page, a button would appear to me that when clicking on it all the scroll made was to the top (beginning of the page)?</p>
  
  <p>I already tested some cases that I found and so far none worked :( can someone help me?</p>
  
  <p><a href="https://stackblitz.com/edit/angular-usvcfa?file=src%2Fapp%2Fapp.component.html" rel="nofollow noreferrer">BLITZ</a></p>
  
  <p><strong>code</strong></p>
  
  <pre><code>  &lt;ul class="mdc-image-list my-image-list" style="padding-left: 10px;padding-right: 10px;"&gt;
      &lt;li class="mdc-image-list__item" *ngFor="let product of Images; let  j = index;"&gt;
        &lt;div class="mdc-image-list__image-aspect-container"&gt;
            &lt;img [src]="product.image" class="mdc-image-list__image"&gt;
        &lt;/div&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  </code></pre>