I can't quite wrap my head around this, but while following this tutorial line-by-line, my Backbone app refuses to render the view template. Please point me in the right direction, as this is my first experience with Backbone, and I've been circling around this problem for the past two days.
This is my /entries.js file:
```javascript
class Raffler.Routers.Entries extends Backbone.Router
routes:
'': 'index'
'entries/:id': 'show'
If I were to replace $('#container').html(view.render().el) with $('#container').html('Raffler') , it would produce the desired outcome. I don't think the el attribute has a value.
My /index.jst.coffee file:
```javascript
class Raffler.Views.EntriesIndex extends Backbone.View
template: JST['entries/index']
render: ->
$(@el).html(@template())
this```
I got error saying that Uncaught TypeError: this.template is not a function
I can't quite wrap my head around this, but while following this tutorial line-by-line, my Backbone app refuses to render the view template. Please point me in the right direction, as this is my first experience with Backbone, and I've been circling around this problem for the past two days.
This is my /entries.js file:
```javascript
class Raffler.Routers.Entries extends Backbone.Router
routes:
'': 'index'
'entries/:id': 'show'
If I were to replace $('#container').html(view.render().el) with $('#container').html('Raffler') , it would produce the desired outcome. I don't think the el attribute has a value.
My /index.jst.coffee file:
```javascript
class Raffler.Views.EntriesIndex extends Backbone.View
template: JST['entries/index']
render: ->
$(@el).html(@template())
this```
I got error saying that
Uncaught TypeError: this.template is not a function
Any help is appreciated!!