title: Angular 6 calling method and asigning value to variable inside *ngFor
body: <p>I want to call a method inside <code>ngFor</code> and want to assign the return value to a local variable. I tried this approach:</p>
  
  <pre><code>&lt;div *ngFor="let card of partNumberPlanningCards; let i = index" class="partnumber-basic-card"&gt;
  &lt;div 
    *ngFor="let scope of containerScopeLineItems; let lineItem = getOperatingWeightBy(scope.containerScopeId, card.typeId)"&gt;
     &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>But it's showing this error:</p>
  
  <pre><code>Parser Error: Unexpected token (, expected identifier, keyword, or string at column 74 in [let scope of containerScopeLineItems; let lineItem = getOperatingWeightBy(scope.containerScopeId, card.typeId)] in ng
  </code></pre>