title: Bind to ngModel in ng-template by passing context from ngTemplateOutlet
body: <p>I have something like this in parent component say 'parent-component' - add/remove value functionality. The consuming component can provide <code>&lt;input&gt; , &lt;textarea&gt;</code> etc</p>
  <pre><code>&lt;ng-container *ngFor=&quot;let val of values; let $index = index;&quot;&gt;
      &lt;ng-container *ngTemplateOutlet=&quot;keyInputTmpl, context: { item: val, index: $index }&quot;&gt;&lt;/ng-container&gt;
  &lt;!-- button to add /remove elements from 'values' --&gt; 
  &lt;/ng-container&gt;'
  </code></pre>
  <p>parent-component.ts:</p>
  <pre><code> @ContentChild('keyInput', {static: true}) keyInputTmpl: TemplateRef&lt;any&gt;;
  </code></pre>
  <p>Also, I have something like this in 'child-component'</p>
  <pre><code>&lt;parent-component [(values)]=&quot;someValues&quot;
                       [readOnly]=&quot;readOnly&quot;&gt;
        &lt;ng-template #keyInput let-item=&quot;item&quot; let-index=&quot;index&quot;&gt;
          &lt;input type=&quot;text&quot;
                 size=&quot;25&quot;
                 [name]=&quot;'name_'+index&quot;
                 [(ngModel)]=&quot;item &amp;&amp; item.name&quot;&gt;
        &lt;/ng-template&gt;
   &lt;/parent-component&gt;
  </code></pre>
  <p>`</p>
  <p>The problem is that the value I enter in <code>&lt;input&gt;</code> of <code>child-component.ts</code> is not available in the <code>parent-component</code>. I think the <code>let-item</code> is not working the way I expect it.</p>
  <p>If using templates is not the right thing how can this problem be solved using other angular constructs? (I also tried using <code>ng-content</code> but that does not support multiple elements like in the case of *ngFor).</p>
  <p>Tried researching for a long time and could not find a solution.</p>