我运行的是Sails V0.10.5和
'get /': {
controller: 'VenueController',
action: 'index'
},
'get /:name': {
controller: 'VenueController',
action: 'showProfile'
}当我使用index方法时,图像得到了完美的服务,但是当我使用showProfile方法时,/ image /logo.png中的图像有时不会加载。这就像是在5-7页刷新之后。
我根本不知道为什么会发生这种情况。
任何帮助都将不胜感激。
发布于 2014-09-12 14:41:18
简单地说,这是因为您没有使用图像位置的绝对路径。
//change this
<img src="your/image/path.jpg" />
//to this
<img src="/your/image/path.jpg" />
//dont' forget the path relative to assests folder附言:这是我的第一个答案,很抱歉我弄错了
https://stackoverflow.com/questions/25802159
复制相似问题