Skip to content

Instantly share code, notes, and snippets.

@Evangenieur
Last active December 18, 2015 07:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Evangenieur/5743750 to your computer and use it in GitHub Desktop.
Save Evangenieur/5743750 to your computer and use it in GitHub Desktop.
Polymer Project with inline CoffeeScript component
<element name="cs-component">
<template>
I am a {{ language }} component
</template>
<script type="text/coffeescript">
Polymer.register @,
language: "CoffeeScript"
ready: ->
console.log "READY", @
</script>
</element>
<html>
<head>
<script src="http://coffeescript.org/extras/coffee-script.js"></script>
<script src="/polymer-all/polymer/polymer.js">
</script>
<link rel="import" href="cs-component.html">
</head>
<body>
<cs-component>
</cs-component>
<script type="text/coffeescript">
console.log "CoffeeScript Working here !"
</script>
</body>
</html>
@Evangenieur
Copy link
Author

Currently only working with Custom Elements Fork

@wprater
Copy link

wprater commented Oct 15, 2013

ahh, they should add such functionality in. Although Id imagine it's slow with the js -> coffee interpreter running in realtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment