# Implementar value en input o selected con \[(ngModel)\]

**URL:** <https://forum.ionicframework.com/t/implementar-value-en-input-o-selected-con-ngmodel/180271>\
**Category:** Ionic Framework\
**Created:** [December 24, 2019, 4:03am UTC](https://forum.ionicframework.com/t/implementar-value-en-input-o-selected-con-ngmodel/180271 "2019-12-24T04:03:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luismzm](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@Luismzm](https://forum.ionicframework.com/u/Luismzm)\
**Post date:** [December 24, 2019, 4:03am UTC](https://forum.ionicframework.com/t/implementar-value-en-input-o-selected-con-ngmodel/180271/1 "2019-12-24T04:03:37Z")

</div>

Lo que quiero hacer es implementar el selected en un ion-select-option pero no me deja, sigue apareciendo vacio el campo esperando a que se elija una opcion. lo mismo pasa con los input cuando trato de ponerle un value no me deja, pero cuando le quito el [(ngModel)] si funciona

\<ion-select placeholder=“Seleccione” [(ngModel)]=“typedoc” name=“typedoc”\>

```
    <ion-select-option selected value="CC">Cédula de Ciudadanía</ion-select-option>

    <ion-select-option value="TI">Tarjeta de Identidad</ion-select-option>
```

---

<div class="post-metadata">

**Author:** ![Motoralfa](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/motoralfa/32/126293_2.png) [@Motoralfa](https://forum.ionicframework.com/u/Motoralfa)\
**Post date:** [December 24, 2019, 8:08am UTC](https://forum.ionicframework.com/t/implementar-value-en-input-o-selected-con-ngmodel/180271/2 "2019-12-24T08:08:08Z")

</div>

Hi there! How are you? What is the initial value of you `typedoc` variable? if your initial value is null or empty, it will replace the current selected option. You can try setting the initial value like this: `this.typedoc = "CC"`. I hope it can help you 🙂

---

<div class="post-metadata">

**Author:** ![Luismzm](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@Luismzm](https://forum.ionicframework.com/u/Luismzm)\
**Post date:** [December 24, 2019, 7:27pm UTC](https://forum.ionicframework.com/t/implementar-value-en-input-o-selected-con-ngmodel/180271/3 "2019-12-24T19:27:00Z")

</div>

thanks, it served me
