Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/22.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
angularjs:加载资源失败:服务器响应状态为400(错误请求)_Angularjs_Laravel 5 - Fatal编程技术网

angularjs:加载资源失败:服务器响应状态为400(错误请求)

angularjs:加载资源失败:服务器响应状态为400(错误请求),angularjs,laravel-5,Angularjs,Laravel 5,我在laravel5.4中使用angularjs,我在我的控制台中得到了这个错误,我不知道为什么会发生,因为控制台中显示的prb源是由以下图像链接引起的: <img class="lazy" src="/{% food.image_principale %}"> 我不明白为什么控制台显示错误,而不是因为我得到了我需要的。 简短回答:将html属性中的src替换为ng src 在src属性中使用像{{hash}}这样的角度标记是不正确的:浏览器将从URL获取文本{{hash},直到A

我在laravel5.4中使用angularjs,我在我的控制台中得到了这个错误,我不知道为什么会发生,因为控制台中显示的prb源是由以下图像链接引起的:

<img class="lazy" src="/{% food.image_principale %}">
我不明白为什么控制台显示错误,而不是因为我得到了我需要的。

简短回答:将html属性中的
src
替换为
ng src

在src属性中使用像{{hash}}这样的角度标记是不正确的:浏览器将从URL获取文本{{hash},直到Angular替换了{{hash}中的表达式。ngSrc指令解决了这个问题

 GET http://livrer/%7B%%20item.getData().image_principale%20%%7D 400 (Bad Request)   %7B%%20item.getData().image_principale%20%%7D:1