Permalink
Browse files

demonstrating the problem

  • Loading branch information...
nyianilos
nyianilos committed Feb 8, 2013
1 parent 35c9775 commit 812b810b67def078605731e8c10dcf613c617ef2
View
@@ -0,0 +1,5 @@
+* the log statement in example-view says Backbone is undefined
+
+* commenting out templates (both in dependency list and in render), fixes it
+
+* requiring backbone in main.coffee fixes works as well
@@ -1,9 +1,10 @@
-define ['jquery', 'templates'], ($, templates) ->
+define ['jquery', 'templates', 'backbone'], ($, templates) ->
class ExampleView
render: (element) ->
$(element).append templates.example({name:'Jade', css:'less'})
$(element).append templates['another-example']({name:'Jade'})
+ console.log Backbone.View
- ExampleView
+ ExampleView
@@ -2,7 +2,11 @@ require
urlArgs: "b=#{(new Date()).getTime()}"
paths:
jquery: 'vendor/jquery'
+ underscore: 'vendor/underscore'
+ backbone: 'vendor/backbone'
+ shim:
+ backbone: ['jquery', 'underscore']
, ['app/example-view']
, (ExampleView) ->
view = new ExampleView()
- view.render('body')
+ view.render('body')
Oops, something went wrong.

0 comments on commit 812b810

Please sign in to comment.