1

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 '{

2
  • The first thing I'm noticing is that the fifth line has a . in it; the others don't. Commented Aug 16, 2012 at 18:25
  • It doesn't like the period, but I'm not sure why: coffeescript.org/… Commented Aug 16, 2012 at 18:27

1 Answer 1

2

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

window.App = new Backbone.Marionette.Application
  Models: {}
  Collections: {}
  Views: 
      Layouts: {}
  Routers: {}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.