【发布时间】:2019-01-28 15:26:31
【问题描述】:
我有一个烧瓶应用程序在这个 url http://127.0.0.1:5000/SectionA 中运行 我正在使用 return jsonify(data) 返回 json 格式的数据。当我从浏览器中点击 url 时,它看起来像这样
我正在像这样从 Angular 应用程序 main-service.ts 文件中调用这个 url
public getVamData(id,section): Observable<any> {
try {
console.log("I am here getVAM");
return this.http.get('http://localhost:5000/SectionA')
.map((response: Response) => {
console.log("I am here getVAM2");
return response.json();
}
);
}
catch(e) {
console.log('Error:', e);
} }
但 url 没有命中烧瓶应用程序。请让我知道我缺少什么。
【问题讨论】:
-
...你在哪里订阅?
标签: javascript angular rest