# Ion-select value get on load of page

**URL:** <https://forum.ionicframework.com/t/ion-select-value-get-on-load-of-page/100673>\
**Category:** ionic-v3\
**Created:** [August 3, 2017, 6:30am UTC](https://forum.ionicframework.com/t/ion-select-value-get-on-load-of-page/100673 "2017-08-03T06:30:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpsharma](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kpsharma](https://forum.ionicframework.com/u/kpsharma)\
**Post date:** [August 3, 2017, 6:30am UTC](https://forum.ionicframework.com/t/ion-select-value-get-on-load-of-page/100673/1 "2017-08-03T06:30:32Z")

</div>

```
        <ion-col><ion-select [(ngModel)]="times" (ionChange)='onTimeChange(times)'>
            <ion-option value="lastweek">Last 1 Week</ion-option>
            <ion-option value="lastmonth">Last 1 Month</ion-option>
            <ion-option value="last3month">Last 3 Month</ion-option>
            <ion-option value="lastyear">Last 1 Year</ion-option>
            <ion-option value="alltime">All time</ion-option>
        </ion-select></ion-col>

```

now i want the default selected value in my ts file for on load of page???

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [August 3, 2017, 6:48am UTC](https://forum.ionicframework.com/t/ion-select-value-get-on-load-of-page/100673/2 "2017-08-03T06:48:48Z")

</div>

Assign to `times` and stop posting dupes.

---

<div class="post-metadata">

**Author:** ![luukschoen](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/luukschoen/32/98585_2.png) [@luukschoen](https://forum.ionicframework.com/u/luukschoen)\
**Post date:** [August 3, 2017, 6:50am UTC](https://forum.ionicframework.com/t/ion-select-value-get-on-load-of-page/100673/3 "2017-08-03T06:50:42Z")

</div>

```auto
<ion-select [(ngModel)]="times" (ionChange)='onTimeChange(times)'>
            <ion-option value="lastweek">Last 1 Week</ion-option>
            <ion-option value="lastmonth">Last 1 Month</ion-option>
            <ion-option value="last3month">Last 3 Month</ion-option>
            <ion-option value="lastyear">Last 1 Year</ion-option>
            <ion-option value="alltime">All time</ion-option>
        </ion-select>      

times: string = 'lastweek';

```

If you have some spare time left, make use of the search functionality. It will probably learn you lots of things and save us some time 🙂

---

<div class="post-metadata">

**Author:** ![kpsharma](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kpsharma](https://forum.ionicframework.com/u/kpsharma)\
**Post date:** [August 3, 2017, 7:37am UTC](https://forum.ionicframework.com/t/ion-select-value-get-on-load-of-page/100673/4 "2017-08-03T07:37:39Z")

</div>

Thank you its working now… actually i am totlly new in ionic …
