I'm trying to migrate a project from Angular2 beta1 to Angular2 beta15 and I have some issues.
I have error message : 'map' property does not exists on 'Observable< Response >'
Example of code with this error :
import { Injectable } from 'angular2/core';
import { Http, Response, Headers } from 'angular2/http';
import { Observable } from 'rxjs/Observable';
import { HelperModule } from './helpers.module';
import { BlogPost } from './model';
import 'rxjs/add/operator/map';
/**
* Service dealing with blog data
*/
@Injectable()
export class DataService {
constructor(private http: Http) { }
/**
* Call API to list available blog posts
*/
listBlogPosts() {
return this.http.get(HelperModule.UrlBuilder.BuildPostListUrl()).map(res => (<Response>res).json());
}
}
Code is available here : https://github.com/AdrienTorris/AspNet5Angular2Playground
EDIT : I'm using rxjs 5.0.0-beta6 and typescript 1.8.10, targetting es6