json文件图像不会加载到离子页面中 [英] json file images won't load in ionic page
问题描述
我正在尝试从服务器上的文件加载一些图像以显示在列表中.我收到404找不到错误在论坛上询问后,我发现请求URL错误,它看起来在localhost而不是json文件中.
I am trying to load some images from a file on a server to display on a list. I get 404 not found error after asking in forums, I get that the request URL is wrong, it looks inside the localhost not inside the json file.
https://filehost.net/db54d37849f75ddd
在代码中,我有一个返回响应的服务.我在控制器和视图中使用该响应.我得到其他信息,但没有图像如果有人有非常好的解决方案.
in the code I have a service which returns a response. I use that response in a controller and to the view. I get other information but no images if anybody has a solution that would be really great.
推荐答案
也请附加一些代码,这样可以更轻松地为您提供帮助.关于此问题,$ http GET请求的格式正确吗?我的意思是您的获取请求指向服务器上的正确地址吗?像这样的东西`//简单的GET请求示例:
please attach also some code, in this way it is easier to help you. About the problem, do have correct form of $http GET request? I mean does your get request points to correct address on server? something like this ` // Simple GET request example:
$http({
method: 'GET',
url: '/someUrl'
}).then(function successCallback(response) {
// this callback will be called asynchronously
// when the response is available
}, function errorCallback(response) {
// called asynchronously if an error occurs
// or server returns response with an error status.
});
`
您可以在此处查看更多信息角度$ http
you can check more here Angular $http
这篇关于json文件图像不会加载到离子页面中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!