Last active
December 18, 2015 07:00
-
-
Save Evangenieur/5743750 to your computer and use it in GitHub Desktop.
Polymer Project with inline CoffeeScript component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
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
Currently only working with Custom Elements Fork