utiq
utiq

Reputation: 1381

Coffeescript property Error: Parse error on line 5: Unexpected '{

I have this code in Coffeescript

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

And I'm trying to get this javascript code

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

I get this error: Error: Parse error on line 5: Unexpected '{

Upvotes: 1

Views: 516

Answers (1)

James M
James M

Reputation: 16718

I think this is what you're trying to do:

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

Upvotes: 2

Related Questions