Last active
April 4, 2016 18:24
-
-
Save johnlindquist/9490f2e9d70c016d2ee80cdf3b40a62b to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>RxJSCraft</title> | |
<script src="https://npmcdn.com/[email protected]/dist/system.js"></script> | |
<script src="https://npmcdn.com/[email protected]/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> |
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
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