Angular JSONP请求-角度2错误
我正试图使用Angular 2向instagram API发出jsonp请求,但我得到“jsonp注入脚本未调用回调” 我遵循了这一点,也遵循了angular 2的官方文档,但无法使其工作Angular JSONP请求-角度2错误,angular,jsonp,instagram-api,Angular,Jsonp,Instagram Api,我正试图使用Angular 2向instagram API发出jsonp请求,但我得到“jsonp注入脚本未调用回调” 我遵循了这一点,也遵循了angular 2的官方文档,但无法使其工作 fetch() { return this._jsonp.get('https://api.instagram.com/v1/users/self/?callback=JSONP_CALLBACK&access_token={token}') .map(res => res.json
fetch() {
return this._jsonp.get('https://api.instagram.com/v1/users/self/?callback=JSONP_CALLBACK&access_token={token}')
.map(res => res.json());
}
Jsonp被注入到构造函数中,并导入到服务和app.module.ts中。
我尝试了callback=JSONP\u回调、c=JSONP\u回调和JSONP=JSONP\u回调,但都不起作用
如果我是通过邮递员完成的,它就可以工作。请检查您使用的@angular/http版本。http-2.4.7版本中存在错误。如果是这种情况,则将其降级为http-2.4.5.btw,相关问题请检查您使用的@angular/http版本。http-2.4.7版本中存在错误。如果是这种情况,则将其降级为http-2.4.5.btw,相关问题