{"action":"closed","issue":{"url":"https://api.github.com/repos/angular/universal-starter/issues/158","repository_url":"https://api.github.com/repos/angular/universal-starter","labels_url":"https://api.github.com/repos/angular/universal-starter/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/angular/universal-starter/issues/158/comments","events_url":"https://api.github.com/repos/angular/universal-starter/issues/158/events","html_url":"https://github.com/angular/universal-starter/issues/158","id":176957515,"number":158,"title":"View doesn't update after http call during prerender","user":{"login":"josiah1888","id":8540978,"avatar_url":"https://avatars.githubusercontent.com/u/8540978?v=3","gravatar_id":"","url":"https://api.github.com/users/josiah1888","html_url":"https://github.com/josiah1888","followers_url":"https://api.github.com/users/josiah1888/followers","following_url":"https://api.github.com/users/josiah1888/following{/other_user}","gists_url":"https://api.github.com/users/josiah1888/gists{/gist_id}","starred_url":"https://api.github.com/users/josiah1888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josiah1888/subscriptions","organizations_url":"https://api.github.com/users/josiah1888/orgs","repos_url":"https://api.github.com/users/josiah1888/repos","events_url":"https://api.github.com/users/josiah1888/events{/privacy}","received_events_url":"https://api.github.com/users/josiah1888/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-14T16:36:53Z","updated_at":"2016-09-15T22:24:07Z","closed_at":"2016-09-15T22:24:07Z","body":"If I make an http call, the server will make the call as expected, but not update the view during serialization.\r\n\r\n```\r\n@Component({\r\n  selector: 'app',\r\n  template: 'Hello Universal App Data: {{data}}'\r\n})\r\nexport class App {\r\n  public data: string = 'initial string';\r\n  constructor(private http: Http) { }\r\n\r\n  ngOnInit() {\r\n    this.http.get('http://jsonplaceholder.typicode.com/posts/1')\r\n      .subscribe(i => {\r\n        const title = i.json().title;\r\n        console.log('I did it, found this: ', title)\r\n        this.data = title;\r\n      });\r\n  }\r\n}\r\n```\r\n\r\nIn this example, we see the console output from the node server with the correct json, but `this.data` does not get updated in the view.\r\n\r\nAs soon as the client rerenders the page, it gets updated correctly but this will not help the initial paint.\r\n\r\nFull example: https://github.com/angular/universal-starter/compare/master...josiah1888:http-example?expand=1"}}
{"actor":{"display_login":"josiah1888"}}