title: Angular 4: Table ng-if value equals row header
body: <p>I need some help please... I want to create a Table like the one in following picture. It should show some values like "1" or "x" when the name of the column matches the row "header/name".    </p>
  
  <p><img src="https://i.imgur.com/AZkt3bd.png" alt="https://imgur.com/AZkt3bd &quot;Description&quot;"></p>
  
  <pre><code>&lt;table class="thead-dark"&gt;
      &lt;tr&gt;
        &lt;th class="pointer"&gt;
          Name
        &lt;/th&gt;
  
        &lt;th class="pointer" *ngFor='let item of applicationlist'&gt;{{item.AName}}
        &lt;/th&gt;
      &lt;/tr&gt;
      &lt;tr *ngFor='let item2 of liste'&gt;
        &lt;th class="pointer"&gt;{{item2.AName}}&lt;/th&gt;
        &lt;td *ngFor='let item of applicationlist'&gt;{{item2.HApllication}}&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>part of my .ts file</p>
  
  <pre><code>bestfuncever() {
      const rootRef = firebase.database().ref();
      const maintable = rootRef.child('/BFunctions/').orderByChild('CFlag').equalTo('active');
      maintable.on('child_added', snap =&gt; {
  
  
        if (snap.val()) {
          this.liste.push(snap.val());
        }
        console.log(this.liste)
        let BFuncGBProcess = rootRef.child('BFunctions/' + snap.key + '/HApllication');
        BFuncGBProcess.once('value').then(Processes =&gt; { 
          if (Processes.val()) {
            this.Processlist.push(Processes.val())};
          let BProess = rootRef.child('Application/' + Processes.val());
          BProess.once('value').then(Applications =&gt; {
            if (Applications.val()) {
              this.applicationlist.push(Applications.val());
                console.log(this.applicationlist)
            }
          })
        })
      })
    }
  </code></pre>