Coffeescript属性错误:第5行的解析错误:意外' {

时间:2012-08-16 18:19:21

标签: coffeescript

我在Coffeescript中有这段代码

window.App = new Backbone.Marionette.Application
Models: {}
Collections: {}
Views: {}
Views.Layouts: {}
Routers: {}

我正在尝试获取此javascript代码

window.App = new Backbone.Marionette.Application({
Models: {},
Collections: {},
Views: {},
Views.Layouts: {},
Routers: {}
});

我收到此错误:错误:第5行的解析错误:意外的'{

1 个答案:

答案 0 :(得分:2)

我认为这就是你要做的事情:

window.App = new Backbone.Marionette.Application
  Models: {}
  Collections: {}
  Views: 
      Layouts: {}
  Routers: {}