Skip to content

Instantly share code, notes, and snippets.

@johnlindquist
Last active April 4, 2016 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save johnlindquist/9490f2e9d70c016d2ee80cdf3b40a62b to your computer and use it in GitHub Desktop.
Save johnlindquist/9490f2e9d70c016d2ee80cdf3b40a62b to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>RxJSCraft</title>
<script src="https://npmcdn.com/systemjs@0.19.24/dist/system.js"></script>
<script src="https://npmcdn.com/typescript@1.8.9/lib/typescript.js"></script>
</head>
<body>
<script>
SystemJS.config({
transpiler: "typescript",
typescriptOptions: {
emitDecoratorMetadata: true
},
map:{
rxjs: 'https://npmcdn.com/rxjs'
},
packages: {
"src": {
"main": "app",
"defaultExtension": "ts"
}
}
});
System.import('src');
</script>
</body>
</html>
import {Observable, Subject} from "rxjs/Rx";
const s = new Subject()
.subscribe(console.log.bind(console))
Observable
.interval(1000)
.subscribe(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment