title: Angular 2: Pass value from attribute directive as a component variable
body: <p>So I have a attribute directive <code>appGetCurrency</code> in here:</p>
  
  <pre><code>&lt;md-select appGetCurrency [(ngModel)]="value" placeholder="Currency" name="currency"&gt;
    &lt;md-option *ngFor="let c of currencyList" [value]="c.code"&gt;{{c.dsc}}&lt;/md-option&gt;
  &lt;/md-select&gt;
  </code></pre>
  
  <p>I would like that the <code>appGetCurrency</code> directive to pass some values to the <code>currencyList</code> in order to build the list of options.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The <code>appGetCurrency</code> directive just get a list of currencies from a service, then I would like to pass that list to the <code>currencyList</code> variable in the host template:</p>
  
  <pre><code>@Directive({ selector: '[appGetCurrency]' })
  
  export class CurrencyDirective {
    currencies;
  
    constructor() {
      // build the &lt;md-options&gt; based on 'currencies' 
      this.currencies = this.service.getCurrencies('asia'); 
    }
  
  }
  </code></pre>