title: How to conditionally add [matMenuTriggerFor] in mat-menu
body: <p>Few <code>#menu</code> items has no sub child. But shows the arrow which indicates there is a submenu. Which is wrong.
  How to add <code>[matMenuTriggerFor]=&quot;subMenu&quot;</code> only when there are items in subMenu.</p>
  <pre class="lang-html prettyprint-override"><code>&lt;mat-menu #menu=&quot;matMenu&quot;&gt;
      &lt;ng-container *ngFor=&quot;let item of menuItem.items; let i=index&quot;&gt; 
          &lt;button class=&quot;mat-menu-item&quot; mat-menu-item
              [routerLink]=&quot;item.routerLink&quot; routerLinkActive=&quot;active&quot; [matMenuTriggerFor]=&quot;subMenu&quot;&gt; {{item.name}}
          &lt;/button&gt;
          &lt;mat-menu #subMenu=&quot;matMenu&quot;&gt; &lt;button class=&quot;mat-sub-menu-item&quot;
                  *ngFor=&quot;let subitem of menuItem.items[i].subitems&quot; mat-menu-item&gt; {{ subitem.name }} &lt;/button&gt;
          &lt;/mat-menu&gt;
      &lt;/ng-container&gt;
  &lt;/mat-menu&gt;
  </code></pre>