{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic/issues/5495","repository_url":"https://api.github.com/repos/driftyco/ionic","labels_url":"https://api.github.com/repos/driftyco/ionic/issues/5495/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic/issues/5495/comments","events_url":"https://api.github.com/repos/driftyco/ionic/issues/5495/events","html_url":"https://github.com/driftyco/ionic/issues/5495","id":134470737,"number":5495,"title":"bug: ion-select does not show selected if number","user":{"login":"jasonwaters","id":427213,"avatar_url":"https://avatars.githubusercontent.com/u/427213?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonwaters","html_url":"https://github.com/jasonwaters","followers_url":"https://api.github.com/users/jasonwaters/followers","following_url":"https://api.github.com/users/jasonwaters/following{/other_user}","gists_url":"https://api.github.com/users/jasonwaters/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonwaters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonwaters/subscriptions","organizations_url":"https://api.github.com/users/jasonwaters/orgs","repos_url":"https://api.github.com/users/jasonwaters/repos","events_url":"https://api.github.com/users/jasonwaters/events{/privacy}","received_events_url":"https://api.github.com/users/jasonwaters/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/driftyco/ionic/labels/select","name":"select","color":"0052cc"},{"url":"https://api.github.com/repos/driftyco/ionic/labels/v2","name":"v2","color":"313744"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-18T03:23:04Z","updated_at":"2016-02-18T16:26:58Z","closed_at":"2016-02-18T16:26:58Z","body":"**Type**: <span ionic-type>bug</span>\n\n**Ionic Version**: <span ionic-version>2.x</span>\n\n**Platform**: <span ionic-platform>all</span>  \n\n<span ionic-description>If you have the following code:\n\n```\n<ion-item>\n  <ion-label>Watering Mode</ion-label>\n  <ion-select [(ngModel)]=\"zone.kind\">\n    <ion-option *ngFor=\"#key of modeKeys\">{{key}}</ion-option>\n  </ion-select>\n</ion-item>\n```\nand \n\n```\n  this.zone = {\n    kind: 'key2'\n  }\n  this.modeKeys = [\n    'key1',\n    'key2',\n    'key3',\n    'key4',\n  ]\n```\nA select component is displayed with 'key2' shown as selected.\n\nBut if you change the data to this:\n\n```\n  this.zone = {\n    kind: 2\n  }\n  this.modeKeys = [\n    1,\n    2,\n    3,\n    4,\n  ]\n```\nIt does not work.  Seems the component prefer strings.\n\nhttps://forum.ionicframework.com/t/ion-select-with-dynamic-options/43720/7</span>\n\n<span is-issue-template></span>\n"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic/issues/comments/185801715","html_url":"https://github.com/driftyco/ionic/issues/5495#issuecomment-185801715","issue_url":"https://api.github.com/repos/driftyco/ionic/issues/5495","id":185801715,"user":{"login":"adamdbradley","id":452425,"avatar_url":"https://avatars.githubusercontent.com/u/452425?v=3","gravatar_id":"","url":"https://api.github.com/users/adamdbradley","html_url":"https://github.com/adamdbradley","followers_url":"https://api.github.com/users/adamdbradley/followers","following_url":"https://api.github.com/users/adamdbradley/following{/other_user}","gists_url":"https://api.github.com/users/adamdbradley/gists{/gist_id}","starred_url":"https://api.github.com/users/adamdbradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamdbradley/subscriptions","organizations_url":"https://api.github.com/users/adamdbradley/orgs","repos_url":"https://api.github.com/users/adamdbradley/repos","events_url":"https://api.github.com/users/adamdbradley/events{/privacy}","received_events_url":"https://api.github.com/users/adamdbradley/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T16:26:58Z","updated_at":"2016-02-18T16:26:58Z","body":"You're right, and I think this was a bug in beta0 that was recently fixed in master. Here's a test example that seems to be working: https://github.com/driftyco/ionic/commit/7e3eb23345a197552ac5ed8483c69d8eb689008a"}}