{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/11271","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/11271/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/11271/comments","events_url":"https://api.github.com/repos/angular/angular/issues/11271/events","html_url":"https://github.com/angular/angular/issues/11271","id":174702210,"number":11271,"title":"RC6 Forms: disabled attribute cannot be set dynamically anymore","user":{"login":"Krisa","id":1253866,"avatar_url":"https://avatars.githubusercontent.com/u/1253866?v=3","gravatar_id":"","url":"https://api.github.com/users/Krisa","html_url":"https://github.com/Krisa","followers_url":"https://api.github.com/users/Krisa/followers","following_url":"https://api.github.com/users/Krisa/following{/other_user}","gists_url":"https://api.github.com/users/Krisa/gists{/gist_id}","starred_url":"https://api.github.com/users/Krisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krisa/subscriptions","organizations_url":"https://api.github.com/users/Krisa/orgs","repos_url":"https://api.github.com/users/Krisa/repos","events_url":"https://api.github.com/users/Krisa/events{/privacy}","received_events_url":"https://api.github.com/users/Krisa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular/labels/comp:%20forms","name":"comp: forms","color":"c5def5"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-09-02T07:59:30Z","updated_at":"2016-09-15T10:23:44Z","closed_at":"2016-09-02T23:13:54Z","body":"**I'm submitting a bug/feature request**  (check one with \"x\")\r\n```\r\n[x] bug report => search github for a similar issue or PR before submitting\r\n[x] feature request\r\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n```\r\n\r\n**Current behavior**\r\nHave a look at that, (demo: http://plnkr.co/edit/P25dYPC5ChRxpyxpL0Lj?p=preview):\r\n```\r\n@Component({\r\n  selector: 'my-app',\r\n  providers: [],\r\n  template: `\r\n    <div [formGroup]=\"form\">\r\n      <input formControlName=\"first\" [disabled]=\"isDisabled\">\r\n    </div>\r\n  `,\r\n  directives: []\r\n})\r\nexport class App {\r\n  isDisabled = true\r\n  form = new FormGroup({\r\n    'first': new FormControl('Hello')\r\n  })\r\n}\r\n```\r\n\r\nThere is a warning message asking to refactor the code, but more importantly, the input is unfortunately not disabled. Refactoring the code to what is suggested is not helping either, i.e. doing this will not work, (demo: http://plnkr.co/edit/Gf7FGR42UXkBh6e75cm2?p=preview):\r\n```\r\n@Component({\r\n  selector: 'my-app',\r\n  providers: [],\r\n  template: `\r\n    <div [formGroup]=\"form\">\r\n      <input formControlName=\"first\">\r\n    </div>\r\n  `,\r\n  directives: []\r\n})\r\nexport class App {\r\n  isDisabled = false\r\n  form = new FormGroup({\r\n    'first': new FormControl({value: 'hello', disabled: this.isDisabled})\r\n  })\r\n  \r\n  constructor() {\r\n    setTimeout(() {\r\n      this.isDisabled = true  \r\n    }, 10)\r\n  }\r\n}\r\n```\r\n\r\n**Expected/desired behavior**\r\nAfter the callback of the setTimeout is executed, the input should be disabled, but it is not.\r\n\r\n**Reproduction of the problem**\r\nYes, please look here: http://plnkr.co/edit/P25dYPC5ChRxpyxpL0Lj?p=preview\r\n\r\n**What is the motivation / use case for changing the behavior?**\r\nTo have the same behaviour, or similar one than in RC5. At least, we shall have a possibility, even if it's a breaking change, to set dynamically the `disabled` attribute. As of now, it does not seem possible anymore.\r\n\r\n**Please tell us about your environment:**\r\n\r\n* **Angular version:** 2.0.0-rc.6\r\n \r\n* **Browser:** [ Chrome 52 ] \r\n \r\n* **Language:** [ TypeScript ] \r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/247291628","html_url":"https://github.com/angular/angular/issues/11271#issuecomment-247291628","issue_url":"https://api.github.com/repos/angular/angular/issues/11271","id":247291628,"user":{"login":"BrainCrumbz","id":3185573,"avatar_url":"https://avatars.githubusercontent.com/u/3185573?v=3","gravatar_id":"","url":"https://api.github.com/users/BrainCrumbz","html_url":"https://github.com/BrainCrumbz","followers_url":"https://api.github.com/users/BrainCrumbz/followers","following_url":"https://api.github.com/users/BrainCrumbz/following{/other_user}","gists_url":"https://api.github.com/users/BrainCrumbz/gists{/gist_id}","starred_url":"https://api.github.com/users/BrainCrumbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrainCrumbz/subscriptions","organizations_url":"https://api.github.com/users/BrainCrumbz/orgs","repos_url":"https://api.github.com/users/BrainCrumbz/repos","events_url":"https://api.github.com/users/BrainCrumbz/events{/privacy}","received_events_url":"https://api.github.com/users/BrainCrumbz/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T10:23:43Z","updated_at":"2016-09-15T10:23:43Z","body":"Is there any update on this? I mean, now you have a view framework that lets you work with declarative, one-way binding code for a load of attributes and for whole content items, but then for *disabled* attribute you're stuck to imperative code?"}}
{"actor":{"display_login":"BrainCrumbz"}}