0

我正在尝试在模板呈现的回调中添加由数据库中的字段填充的星级。我相信问题是老鼠找不到图像,但我在让它工作时遇到了麻烦。图片当前位于 App/public/img 中,回调中的比例代码为:

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'
});
4

1 回答 1

0

试试path:/img Meteor中的公用文件夹看成/

您可能还需要引用它。路径:'/img',

于 2015-06-29T19:47:54.050 回答