0

I've recently started learning how to create webpages and I need help learning Eco Templates. I am trying to display data in a template on my webpage. This is an example of the line of code in my script tags in the body:

<script src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js"></script>
<script src="http://sstephenson.github.com/eco/dist/eco.js"></script>
<script>
    eco.render "<p><%- @word %></p>", {word: "hey"}
</script>

However, I get an error that says "Missing ; before statement". What do I need to do to get this to display on my page?

oberfreak
  • 1,799
  • 13
  • 20
Mike
  • 1
  • 1

1 Answers1

1

Don't you need to add type="text/coffeescript" to your script tag for the coffeescript library to compile client side?

Justin Beckwith
  • 7,686
  • 1
  • 33
  • 55