title: Show all data from a sql table. (Angular)
body: <p>My problem is that I need to show all the entries of a sql table in Angular view.</p>
  
  <p>I can already access the elements by ID, but I would like to press a button to show all.</p>
  
  <pre><code>&lt;h3&gt; Mostrar disco&lt;/h3&gt;
  ¿Que disco quieres ver? &lt;input #id&gt;&lt;br&gt;
  &lt;button type="button" (click) = "mostrarDisco(id.value)"&gt;Mostrar&lt;/button&gt;&lt;br&gt;
  &lt;hr&gt;
  &lt;div *ngIf="disco!=null"&gt;
  Titulo:{{disco.titulo}} &lt;br&gt;
  Interprete:{{disco.interprete}} &lt;br&gt;
  Año Publicacion:{{disco.anyoPublicacion}} &lt;br&gt;
  &lt;hr&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I know I have to use ngFor in the view but I don't know how to do it.</p>
  
  <p>API query:</p>
  
  <pre><code>router.get('/discos', (req, res)=&gt;{
  mysqlConnection.query('SELECT * FROM discos', (err, rows, fields)=&gt;{
  
      if(!err){
        res.json(rows);
      }else{
       console.log(err);
      }
  
  
  })
  
  });
  </code></pre>
  
  <p>Query discos by ID:</p>
  
  <p>Service:</p>
  
  <pre><code>  getDisco(id:number)
    {
      return this.http.get(this.url + "/" + id)
    }
  </code></pre>
  
  <p>Component:</p>
  
  <pre><code> mostrarDisco(id:number)
  
  
   {
      this.apiService.getDisco(id).subscribe((data) =&gt;
    {
    this.disco = data[0]
    })  
    }
  </code></pre>
  
  <p>Help me please!</p>