在Meteor.js Spacebars中使用replace函数

时间:2016-01-22 19:09:59

标签: javascript meteor replace

我正在使用Meteor.js并正在使用他们的Spacebars Template system。系统不允许我使用JavaScript的replace功能。我在这做错了什么?

{{#each this.PDFs}}
    <h5>{{this.replace(/\+(.*)$/,'')}}</h5><li class="pdf-document"><a href="{{file this}}" target="{{this}}" class="icon-document"></a></li>
{{/each}}

0 个答案:

没有答案