{"action":"closed","issue":{"url":"https://api.github.com/repos/angular/angular/issues/5489","labels_url":"https://api.github.com/repos/angular/angular/issues/5489/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/5489/comments","events_url":"https://api.github.com/repos/angular/angular/issues/5489/events","html_url":"https://github.com/angular/angular/issues/5489","id":119031735,"number":5489,"title":"Observable sequence for click events using RxJS","user":{"login":"varghesep","id":12233474,"avatar_url":"https://avatars.githubusercontent.com/u/12233474?v=3","gravatar_id":"","url":"https://api.github.com/users/varghesep","html_url":"https://github.com/varghesep","followers_url":"https://api.github.com/users/varghesep/followers","following_url":"https://api.github.com/users/varghesep/following{/other_user}","gists_url":"https://api.github.com/users/varghesep/gists{/gist_id}","starred_url":"https://api.github.com/users/varghesep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varghesep/subscriptions","organizations_url":"https://api.github.com/users/varghesep/orgs","repos_url":"https://api.github.com/users/varghesep/repos","events_url":"https://api.github.com/users/varghesep/events{/privacy}","received_events_url":"https://api.github.com/users/varghesep/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-26T12:00:38Z","updated_at":"2015-11-27T03:58:23Z","closed_at":"2015-11-27T03:58:23Z","body":"Using this [rx.angular.js](https://github.com/Reactive-Extensions/rx.angular.js) library, the click events can be turned to an observable sequence. I think this library works with **angular1** only.\r\n\r\nCan I achieve the same in angular2 with internal **EventEmitter** or should I integrate with **RxJS**?\r\n\r\nExample from the **rx.angular.js** library:\r\n\r\n```javascript\r\n/*\r\n      Creates a \"click\" function which is an observable sequence instead of just a function.\r\n    */\r\n    $scope.$createObservableFunction('click')\r\n      .map(function () { return $scope.search; })\r\n      .flatMapLatest(searchWikipedia)\r\n      .subscribe(function(results) {\r\n        $scope.results = results;\r\n      });\r\n```"}}