2012-04-11 92 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