我正在尝试添加由我的数据库中的字段填充的星级在模板呈现回调中。我认为问题是raty找不到图像,但我在运行时遇到了问题。图片当前在App/public/img中,回调中的Rati码为:
Template.game.rendered = function() {
$('.game-rating').raty({
readOnly: true,
numberMax : 5,
path: App/public/img,
score: function() {
return $(this).attr('data-score');
},
starOff: 'star-off.png',
starOn: 'star-on.png'
});发布于 2015-06-30 03:47:54
尝试路径:/img Meteor中的公用文件夹显示为/
您可能还需要引用它。路径:‘/img’,
https://stackoverflow.com/questions/31123705
复制相似问题