Angular 2 polling with RxJS
I'm trying to poll a RESTful endpoint to refresh my live chat messages. I know the best approach for a live chat would be Websockets, I'm just trying to understand how RxJS works with Angular 2. I want to check for new messages every second. I have the following code: return Rx.Observable .interval(1000) .flatMapLatest(() => this.http.get(`${AppSettings.API_ENDPOINT}/messages`)) .map(response => response.json()) .map((messages: Object[]) => { return messages.map(message => this.parseData(message)); }); However my Typescript transpiler is returning this error: Property 'flatMapLatest' does not