{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/13243","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/13243/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/13243/comments","events_url":"https://api.github.com/repos/angular/angular/issues/13243/events","html_url":"https://github.com/angular/angular/issues/13243","id":193543935,"node_id":"MDU6SXNzdWUxOTM1NDM5MzU=","number":13243,"title":"Binding on input [type] is broken","user":{"login":"GuyShaanan","id":7248108,"node_id":"MDQ6VXNlcjcyNDgxMDg=","avatar_url":"https://avatars1.githubusercontent.com/u/7248108?v=4","gravatar_id":"","url":"https://api.github.com/users/GuyShaanan","html_url":"https://github.com/GuyShaanan","followers_url":"https://api.github.com/users/GuyShaanan/followers","following_url":"https://api.github.com/users/GuyShaanan/following{/other_user}","gists_url":"https://api.github.com/users/GuyShaanan/gists{/gist_id}","starred_url":"https://api.github.com/users/GuyShaanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuyShaanan/subscriptions","organizations_url":"https://api.github.com/users/GuyShaanan/orgs","repos_url":"https://api.github.com/users/GuyShaanan/repos","events_url":"https://api.github.com/users/GuyShaanan/events{/privacy}","received_events_url":"https://api.github.com/users/GuyShaanan/received_events","type":"User","site_admin":false},"labels":[{"id":393879365,"node_id":"MDU6TGFiZWwzOTM4NzkzNjU=","url":"https://api.github.com/repos/angular/angular/labels/comp:%20forms","name":"comp: forms","color":"c5def5","default":false},{"id":375497160,"node_id":"MDU6TGFiZWwzNzU0OTcxNjA=","url":"https://api.github.com/repos/angular/angular/labels/freq2:%20medium","name":"freq2: medium","color":"fbca04","default":false},{"id":222006107,"node_id":"MDU6TGFiZWwyMjIwMDYxMDc=","url":"https://api.github.com/repos/angular/angular/labels/state:%20Blocked","name":"state: Blocked","color":"006b75","default":false},{"id":130606845,"node_id":"MDU6TGFiZWwxMzA2MDY4NDU=","url":"https://api.github.com/repos/angular/angular/labels/type:%20feature","name":"type: feature","color":"EEEEEE","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/angular/angular/milestones/82","html_url":"https://github.com/angular/angular/milestone/82","labels_url":"https://api.github.com/repos/angular/angular/milestones/82/labels","id":3045967,"node_id":"MDk6TWlsZXN0b25lMzA0NTk2Nw==","number":82,"title":"Backlog","description":"Milestone for triaged issues that have not yet been scheduled for resolution.","creator":{"login":"IgorMinar","id":216296,"node_id":"MDQ6VXNlcjIxNjI5Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/216296?v=4","gravatar_id":"","url":"https://api.github.com/users/IgorMinar","html_url":"https://github.com/IgorMinar","followers_url":"https://api.github.com/users/IgorMinar/followers","following_url":"https://api.github.com/users/IgorMinar/following{/other_user}","gists_url":"https://api.github.com/users/IgorMinar/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorMinar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorMinar/subscriptions","organizations_url":"https://api.github.com/users/IgorMinar/orgs","repos_url":"https://api.github.com/users/IgorMinar/repos","events_url":"https://api.github.com/users/IgorMinar/events{/privacy}","received_events_url":"https://api.github.com/users/IgorMinar/received_events","type":"User","site_admin":false},"open_issues":1844,"closed_issues":211,"state":"open","created_at":"2018-01-18T16:52:20Z","updated_at":"2018-06-19T22:34:47Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-12-05T16:25:30Z","updated_at":"2018-06-20T16:50:40Z","closed_at":null,"author_association":"NONE","body":"**I'm submitting a ...** \r\n```\r\n[x] bug report => search github for a similar issue or PR before submitting\r\n```\r\n\r\n**Current behavior**\r\nTry to bind the `type` attribute of input:\r\n\r\n```js\r\n// in Class\r\ninputType=\"number\"\r\n\r\n// in html\r\n<input [type]=\"inputType\" formControlName=\"integerB\" />\r\n```\r\nInitially, the value is presented as number when doing `form.value`:\r\n\r\n```js\r\n{\"integerB\": 5}\r\n```\r\nNow, try to change the input's value.\r\n\r\n**Its type has changed to string:**\r\n\r\n```js\r\n{\"integerB\": \"5\"}\r\n```\r\n\r\nwhile it seems the html attributes haven't changed:\r\n```html\r\n// chrome dev console\r\n<input formcontrolname=\"integerB\" ng-reflect-name=\"integerB\" ng-reflect-type=\"number\" type=\"number\" class=\"ng-valid ng-dirty ng-touched\">\r\n```\r\n\r\n**Expected behavior**\r\nIf we *are* able to bind to [type], the input type should have stayed \"number\", so does the value.\r\n\r\n**Minimal reproduction of the problem with instructions**\r\nhttp://plnkr.co/edit/kp0xoDbZmJnD5orOTZUj?p=preview\r\n\r\n**What is the motivation / use case for changing the behavior?**\r\nI'm dynamiclly generating forms from given JSON, so binding to [type] can save a lot of copy-paste code.\r\n\r\n**Please tell us about your environment:**\r\nNot sure this is relevant as it is reproducible in plnkr.\r\n\r\nThanks.\r\n\r\n**Edit**: same goes if binding [type] to `inputType=\"checkbox\"`.\r\n**Edit2**: this is also broken in the Dynamic Forms demo if you change \"email\" type to number (for example)"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/398820341","html_url":"https://github.com/angular/angular/issues/13243#issuecomment-398820341","issue_url":"https://api.github.com/repos/angular/angular/issues/13243","id":398820341,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODgyMDM0MQ==","user":{"login":"ceor","id":14966978,"node_id":"MDQ6VXNlcjE0OTY2OTc4","avatar_url":"https://avatars0.githubusercontent.com/u/14966978?v=4","gravatar_id":"","url":"https://api.github.com/users/ceor","html_url":"https://github.com/ceor","followers_url":"https://api.github.com/users/ceor/followers","following_url":"https://api.github.com/users/ceor/following{/other_user}","gists_url":"https://api.github.com/users/ceor/gists{/gist_id}","starred_url":"https://api.github.com/users/ceor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceor/subscriptions","organizations_url":"https://api.github.com/users/ceor/orgs","repos_url":"https://api.github.com/users/ceor/repos","events_url":"https://api.github.com/users/ceor/events{/privacy}","received_events_url":"https://api.github.com/users/ceor/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T16:50:40Z","updated_at":"2018-06-20T16:50:40Z","author_association":"NONE","body":"Is there another Angular way of doing forms?"}}
{"actor":{"display_login":"ceor"}}