title: How to pass child variables to parent in Angular?
body: <p>I'm using two components, <code>SelectTag</code> and the main component, <code>SettingsComponent</code>. The select component is a simple directive with a selector, but the issue I'm having is updating a parent variable from the child component.  </p>
  
  <p>For example: I have an <code>ngModel</code> binding to a variable (<code>name</code>) in the selector component, but how can I access this from the parent component (settings)?  </p>
  
  <p>What I've tried so far is using the Angular <code>EventEmitter</code>:  </p>
  
  <pre><code>@Output() onNameChange: EventEmitter&lt;string&gt;;
  </code></pre>
  
  <p>...and accessing it through  </p>
  
  <pre><code>&lt;select-tag (onNameChange)="name = $event"&gt;
  </code></pre>
  
  <p>Is there a better practice to doing this?</p>