Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.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
Image 具有相对图像路径的余烬动态路径_Image_Ember.js_Relative Path_Dynamic Routing - Fatal编程技术网

Image 具有相对图像路径的余烬动态路径

Image 具有相对图像路径的余烬动态路径,image,ember.js,relative-path,dynamic-routing,Image,Ember.js,Relative Path,Dynamic Routing,在动态管线上使用相对图像路径,将管线添加到图像之前,请参见 为什么会这样?有没有一种方法可以通过动态路径使用相对图像路径?这在任何地方都有记录吗?相对映像路径前面有动态路由,因为相对映像路径缺少前导的/ 因此,假设我们正在访问一条动态路径foobar。下面的图像路径将: /assets/images/foo.png->:///assets/images/foo.png assets/images/foo.png->:///foo-bar/assets/images/foo.png 这不是一个Em

在动态管线上使用相对图像路径,将管线添加到图像之前,请参见


为什么会这样?有没有一种方法可以通过动态路径使用相对图像路径?这在任何地方都有记录吗?

相对映像路径前面有动态路由,因为相对映像路径缺少前导的
/

因此,假设我们正在访问一条动态路径
foobar
。下面的图像路径将:

/assets/images/foo.png
->
:///assets/images/foo.png

assets/images/foo.png
->
:///foo-bar/assets/images/foo.png

这不是一个Ember.js的东西,它是一个浏览器和文件路径的东西


考虑一下答案。

谢谢。我知道这很简单。:-)