title: Angular 4+ conditionally render mat-menu (all or some mat menu options)
body: <p>Ello,</p>
  
  <p>I am rendering a mat-table and each row has an eclipse (3 dots) that displays a mat-menu. Right now, every row clicked shows the same menu option say </p>
  
  <ol>
  <li>List item 1</li>
  <li>List item 2</li>
  <li>List item 3</li>
  </ol>
  
  <p>My row has additional data and I'd like to use said data to display all list items, or some. </p>
  
  <p>I tried using ngIf inside one of the mat-menu options, but no cigar </p>
  
  <pre><code>     &lt;mat-menu #menu="matMenu" &gt;
          &lt;ng-template matMenuContent let-someId="someId" let-eventOtherId="eventitherId" let-testcondition="condition"&gt;
            &lt;a href="" *ngIf="testcondition === 'some item'"  mat-menu-item [routerLink]="[]"&gt;
              &lt;mat-icon&gt;info&lt;/mat-icon&gt;
              &lt;span&gt;List Item 1&lt;/span&gt;
            &lt;/a&gt;
            &lt;button mat-menu-item (click)="openDialog([someId])"&gt;
              &lt;mat-icon&gt;save_alt&lt;/mat-icon&gt;
              &lt;span&gt;List Item 2&lt;/span&gt;
            &lt;/button&gt;
            &lt;button  mat-menu-item (click)="openDialog([someId])"&gt;
              &lt;mat-icon&gt;add&lt;/mat-icon&gt;
              &lt;span&gt;List Item 3&lt;/span&gt;
            &lt;/button&gt;
          &lt;/ng-template&gt;
        &lt;/mat-menu&gt;
  </code></pre>
  
  <p>so ideally, I'd like to display list item 1 if testcondition === 'some item' and render list item 2 if testcondition === 'some other item'</p>
  
  <p><strong>edit: After digging around some more, it turns out out that <em>let-testcondition="condition"</em> doesn't evaluate to anything. testcondition should have a value associated with it (from the condition property which I can see in my console) but in the ng-container no value for testcondition even though someId and eventOtherId have a value. Any help on using let variable inside template would be much appreciated</strong></p>