{"action":"closed","issue":{"url":"https://api.github.com/repos/angular/angular/issues/7328","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/7328/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/7328/comments","events_url":"https://api.github.com/repos/angular/angular/issues/7328/events","html_url":"https://github.com/angular/angular/issues/7328","id":136859492,"number":7328,"title":"Support async pipes with input as promises returned from a function invocation","user":{"login":"lastmjs","id":7000719,"avatar_url":"https://avatars.githubusercontent.com/u/7000719?v=3","gravatar_id":"","url":"https://api.github.com/users/lastmjs","html_url":"https://github.com/lastmjs","followers_url":"https://api.github.com/users/lastmjs/followers","following_url":"https://api.github.com/users/lastmjs/following{/other_user}","gists_url":"https://api.github.com/users/lastmjs/gists{/gist_id}","starred_url":"https://api.github.com/users/lastmjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lastmjs/subscriptions","organizations_url":"https://api.github.com/users/lastmjs/orgs","repos_url":"https://api.github.com/users/lastmjs/repos","events_url":"https://api.github.com/users/lastmjs/events{/privacy}","received_events_url":"https://api.github.com/users/lastmjs/received_events","type":"User","site_admin":false},"labels":[{"id":375501288,"url":"https://api.github.com/repos/angular/angular/labels/comp:%20core%20&%20compiler","name":"comp: core & compiler","color":"c7def8","default":false},{"id":130606848,"url":"https://api.github.com/repos/angular/angular/labels/type:%20RFC%20/%20discussion%20/%20question","name":"type: RFC / discussion / question","color":"EEEEEE","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-02-27T01:22:34Z","updated_at":"2016-12-11T12:17:39Z","closed_at":"2016-12-11T12:17:39Z","body":"Right now async pipes break in templates when the promise passed into them is the result of a function invocation directly in the template. I think it would be nice to allow this behavior. For example:\n\n```\n@Component({\n    selector: 'async-pipe-test',\n    template: '<div>{{delayedMessage() | async}}</div>'\n})\n\nexport class AsyncPipeTestComponent {\n    constructor() {\n         }\n\n    delayedMessage() {\n        return new Promise(function(resolve, reject) {\n            setTimeout(function() {\n                  resolve('this is the message');\n            }, 500);\n        });\n    }\n\n}\n```\n\ndoes not work. That was not obvious to me, and I think it should work. I at least have a use case for it, where I pass a function into the template that evaluates to a promise.\n"}}
{"actor":{"display_login":"robwormald"}}