title: How to get select attribute in angular 6
body: <p>I tried below code to get the value of data attribute of country but does not worked.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  fieldId: target.getAttribute('data-country_id'),
     const selectEl = event.target;
     var id = angular.element(event).data('country_id');
    console.log("test"+event.currentTarget.getAttribute("data-id"));</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  &lt;select name="state"  [(ngModel)]="model.state"  id="state"  (ngModelChange)="GetCitySelected($event)" &gt;
    &lt;option *ngFor="let state of StateList" value="{{state.id}}" [attr.data-country_id]="state.country_id"&gt;{{state.name}}&lt;/option&gt;
     &lt;/select&gt;
                                              
                                     </code></pre>
  </div>
  </div>
  </p>