Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typescript 为什么会更改为SafeSubscription_Typescript_Ionic Framework_Ionic2_Rxjs - Fatal编程技术网

Typescript 为什么会更改为SafeSubscription

Typescript 为什么会更改为SafeSubscription,typescript,ionic-framework,ionic2,rxjs,Typescript,Ionic Framework,Ionic2,Rxjs,我需要找出为什么我的这个对象在我的TS和ionic应用程序中从view controller变为SafeSubscriber 我的数据服务: getStationData(name:string){ let myURL = "http://some/url/request.php?name="+ name; return this.http.get(myURL) .map( res =&g

我需要找出为什么我的
这个
对象在我的
TS
ionic
应用程序中从
view controller
变为
SafeSubscriber

我的数据服务:

getStationData(name:string){

        let myURL = "http://some/url/request.php?name="+ name;

        return this.http.get(myURL)
                .map(
                    res => {return this.parseData(res._body);},
                    err => console.log(err));
};
我的视图控制器:

//here, this is still the correct object : view controller
this._dataService.getStationData(name).subscribe((data) =>{
    //here, this now becomes of type safe subscriber?
    console.log(this);
    //when I hover in chrome over this, it shows all view controller parameters.
    //but when I call a method, it's not defined?
});

http.get
请求是否有问题?

您正在将错误处理程序作为
thisArg
传递给。这很可能与你的问题有关。谢谢,我会查一查的。有趣的是,它曾用于以前的Angular/Ionic版本,但在最近的更新失败后。。。