Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.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
Javascript 角度:尝试在iframe 404内的img src中显示资产图像_Javascript_Angular - Fatal编程技术网

Javascript 角度:尝试在iframe 404内的img src中显示资产图像

Javascript 角度:尝试在iframe 404内的img src中显示资产图像,javascript,angular,Javascript,Angular,在我的应用程序中,我有一个元素,在其中我最初加载它的src预览图像,因此当它最初加载时,它在页面中看起来不会被破坏,而且还没有为它分配任何内容 <img id="preview" src="./../../../../assets/transparent-3.png" alt="" class="image-preview-box" /> 我已经试着直接指向资产(前面没有点和斜线),或者在src的开头不

在我的应用程序中,我有一个元素,在其中我最初加载它的src预览图像,因此当它最初加载时,它在页面中看起来不会被破坏,而且还没有为它分配任何内容

<img id="preview" src="./../../../../assets/transparent-3.png" alt="" class="image-preview-box" />

我已经试着直接指向资产(前面没有点和斜线),或者在src的开头不使用./,但它没有起作用。有人知道这里会出现什么问题吗?

只尝试
assets/transparent-3.png
path。我第一次使用/assets/transparent-3.png时意识到这是有效的,所以它不起作用。非常感谢您:D.快乐编码:)只尝试
assets/transparent-3.png
path。这很有效,我第一次使用/assets/transparent-3.png时意识到了这一点,所以它不起作用。非常感谢:D.快乐编码:)
Failed to load resource: the server responded with a status of 404 (Not Found)