kondi0 / ng4-intl-phone

An internation phone prefix selector for Angular 4
MIT License
20 stars 64 forks source link

How do I set an ID for the input? #23

Open bostondevin opened 6 years ago

bostondevin commented 6 years ago

I'm trying to attach a label to this for accessibility so we need to be able to set the ID of the input the int-phone-prefix is producing. Ideally, something that would work like this:

    <div [formGroup]="form">
      <label for="input-{{_data.mappedId}}">{{label}}</label>
      <int-phone-prefix [locale]="'es'" [formControlName]="_data.mappedId" id="input-{{_data.mappedId}}"></int-phone-prefix>
    </div>`