{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/1482","labels_url":"https://api.github.com/repos/angular/angular/issues/1482/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/1482/comments","events_url":"https://api.github.com/repos/angular/angular/issues/1482/events","html_url":"https://github.com/angular/angular/issues/1482","id":69915462,"number":1482,"title":"[Dart] How to propagate change down to input","user":{"login":"cgarciae","id":5862228,"avatar_url":"https://avatars.githubusercontent.com/u/5862228?v=3","gravatar_id":"","url":"https://api.github.com/users/cgarciae","html_url":"https://github.com/cgarciae","followers_url":"https://api.github.com/users/cgarciae/followers","following_url":"https://api.github.com/users/cgarciae/following{/other_user}","gists_url":"https://api.github.com/users/cgarciae/gists{/gist_id}","starred_url":"https://api.github.com/users/cgarciae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgarciae/subscriptions","organizations_url":"https://api.github.com/users/cgarciae/orgs","repos_url":"https://api.github.com/users/cgarciae/repos","events_url":"https://api.github.com/users/cgarciae/events{/privacy}","received_events_url":"https://api.github.com/users/cgarciae/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"vsavkin","id":35996,"avatar_url":"https://avatars.githubusercontent.com/u/35996?v=3","gravatar_id":"","url":"https://api.github.com/users/vsavkin","html_url":"https://github.com/vsavkin","followers_url":"https://api.github.com/users/vsavkin/followers","following_url":"https://api.github.com/users/vsavkin/following{/other_user}","gists_url":"https://api.github.com/users/vsavkin/gists{/gist_id}","starred_url":"https://api.github.com/users/vsavkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsavkin/subscriptions","organizations_url":"https://api.github.com/users/vsavkin/orgs","repos_url":"https://api.github.com/users/vsavkin/repos","events_url":"https://api.github.com/users/vsavkin/events{/privacy}","received_events_url":"https://api.github.com/users/vsavkin/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-04-21T18:17:38Z","updated_at":"2015-06-01T23:18:31Z","closed_at":"2015-06-01T23:06:19Z","body":"How do I propagate the change in `name` due to the `button`'s click back to the `input` in this example? \r\n\r\n````html\r\n<div>\r\n  <h1>Hello {{ name.value }}</h1>\r\n  <button (click)=\"name.updateValue('Cristian')\">Cristian</button>\r\n  <input type=\"text\" [control]=\"name\">\r\n</div>\r\n```\r\n```dart\r\nlibrary testcomp;\r\n\r\nimport 'package:angular2/angular2.dart';\r\n\r\n@Component(\r\n  selector: 'my-app'\r\n)\r\n@View(\r\n  templateUrl: 'components/test.html',\r\n  directives: const[\r\n    const[ //XXX: workaround for FormDirectives not being const.\r\n      ControlGroupDirective,\r\n      ControlDirective,\r\n      CheckboxControlValueAccessor,\r\n      DefaultValueAccessor],\r\n    If]\r\n)\r\nclass AppComponent {\r\n  Control name = new Control('World');\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/107743990","html_url":"https://github.com/angular/angular/issues/1482#issuecomment-107743990","issue_url":"https://api.github.com/repos/angular/angular/issues/1482","id":107743990,"user":{"login":"gdi2290","id":1016365,"avatar_url":"https://avatars.githubusercontent.com/u/1016365?v=3","gravatar_id":"","url":"https://api.github.com/users/gdi2290","html_url":"https://github.com/gdi2290","followers_url":"https://api.github.com/users/gdi2290/followers","following_url":"https://api.github.com/users/gdi2290/following{/other_user}","gists_url":"https://api.github.com/users/gdi2290/gists{/gist_id}","starred_url":"https://api.github.com/users/gdi2290/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdi2290/subscriptions","organizations_url":"https://api.github.com/users/gdi2290/orgs","repos_url":"https://api.github.com/users/gdi2290/repos","events_url":"https://api.github.com/users/gdi2290/events{/privacy}","received_events_url":"https://api.github.com/users/gdi2290/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T23:18:31Z","updated_at":"2015-06-01T23:18:31Z","body":"@cgarciae the problem was that you were only updating the (js) model and not the element directly (input). this is fixed with `<input type=\"text\" [(ng-model])=\"name>` (in next release) since it correctly wires data-binding.\r\nIf you don't mind javascript I have a small example showing how I updated both parts on form submission\r\n[angular-class/angular2-webpack-starter/src/app/components/todo.ts#L68](https://github.com/angular-class/angular2-webpack-starter/blob/4d9645478a83c9e4a0a4a50fd7bb80286da28d60/src/app/components/todo.ts#L68)"}}