title: *ngIf - reference a property which needs to be set more than once
body: <p>On <code>Angular 6</code>, I've got a WIJMO grid on my template. This grid pulls from a database table. Each row of the grid should have either a <code>delete</code> button or an <code>un-delete</code> button, depending on <code>*ngIf else</code>:</p>
  
  <pre><code>&lt;wj-flex-grid&gt;
          &lt;wj-flex-grid-column [header]="'ID'" [binding]="'ID'"&gt;&lt;/wj-flex-grid-column&gt;
          &lt;wj-flex-grid-column [header]="'deleted'" [binding]="'deleted'"&gt;&lt;/wj-flex-grid-column&gt;
  
          &lt;wj-flex-grid-column [header]="'delete/undelete buttons'" [binding]="'buttons'"&gt;
  
              &lt;button *ngIf="!deleted; else unDeleted"&gt;Delete&lt;/button&gt;
                  &lt;ng-template #unDeleted&gt;
                      &lt;button&gt;Un-Delete&lt;/button&gt;
                  &lt;/ng-template&gt;
  
          &lt;/wj-flex-grid-column&gt;
  &lt;/wj-flex-grid&gt;
  </code></pre>
  
  <p>My problem lies with setting this <code>deleted</code> property in the .ts file. I need to set and read this property multiple times AKA for every row of the table - but <code>*ngIf</code> only wants to use it after the last time it is defined. 
  So for my typescript, which uses a <code>for loop</code> on every data item and sets <code>deleted</code> property to true or false based on a database column, if the last row of the grid is marked as deleted in the database, then all the buttons will show <code>undelete</code> and vice versa:</p>
  
  <pre><code>export class myComponent extends WjFlexGridParent implements OnChanges, OnInit {
  
  /////// deleted property //////
  ////// *ngIf only likes to read this after the last time it is defined //////
      public deleted: boolean;
  
         loadData() {        
          this.myDatabaseService.get(this.myApiPath)
              .subscribe
              (
                  data =&gt; {
  
                    this.setCollectionView(data);
                    this.m_collectionView.trackChanges = true;
  
                      /////// delete/undelete logic //////
                      for (var i = 0; i &lt; data.length; i++) {
                          if (data[i].deleted == null) {
                              this.deleted = false;
                          } 
                          else if (data[i].deleted !== null) {
                              this.deleted = true;
                          }
                      }
                  errorCode =&gt; {
                      // this.statusMessage = "";
                  }
              }
              );
      }
  
  }
  </code></pre>
  
  <p>How can I get <code>*ngIf</code> to read this property after every time it is updated?</p>