Skip to content

Instantly share code, notes, and snippets.

@danielschmitz
Last active May 20, 2016 05:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielschmitz/b2e7f085b544c464bbed to your computer and use it in GitHub Desktop.
Save danielschmitz/b2e7f085b544c464bbed to your computer and use it in GitHub Desktop.
<script>
System.config({
transpiler: 'typescript',
typescriptOptions: { emitDecoratorMetadata: true },
packages: {'app': {defaultExtension: 'ts'}}
});
System.import('app/main')
.then(null, console.error.bind(console));
</script>
document.write("<button id='mybtn'>Click Me</button>");
var _this = this;
_this.hello = "Hello World";
var btn = document.getElementById('mybtn');
btn.addEventListener('click', function () {
document.write(_this.hello);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment