2012-04-11 49 views
0

我有在我的模板文件,并在JavaScript控制台我得到以下错误读Rails项目:非法XML字符Backbone.js的模板

illegal XML character 
appointment_show.js?body=1()appoin...?body=1 (line 2) 
[Break On This Error] this.JST["appointments/show"] = <%= topic %>; 

这是我目前的骨干观点我“M用打转转:

window.AppointmentView = Backbone.View.extend({ 
    template: JST["appointments/show"], 

    render: function(){ 
     this.$el.html(this.template(this.model.toJSON())); 
     return this; 
    } 
}); 

这里是我的应用程序/资产/模板/约会/ show.jst文件

<%= topic %> 

回答

0

我只需要将我的应用程序/ assets/templates/appointmentments/show.jst重命名为show.jst.ejs