(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/** | |
* Read the text contents of a File or Blob using the FileReader interface. | |
* This is an async interface so it makes sense to handle it with Rx. | |
* @param {blob} File | Blob | |
* @return Observable<string> | |
*/ | |
const readFile = (blob) => Observable.create(obs => { | |
if (!(blob instanceof Blob)) { | |
obs.error(new Error('`blob` must be an instance of File or Blob.')); | |
return; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# This script was created to convert a directory full | |
# of markdown files into rst equivalents. It uses | |
# pandoc to do the conversion. | |
# | |
# 1. Install pandoc from http://johnmacfarlane.net/pandoc/ | |
# 2. Copy this script into the directory containing the .md files | |
# 3. Ensure that the script has execute permissions | |
# 4. Run the script | |
# | |
# By default this will keep the original .md file |
This may be a dumb solution, you'd better use $rootScope.$on(event, handler)
and $rootScope.$emit(event, args…)
and not use a third-party service.
My solution will bring you:
off()
if you really want to clean up your event handlers<script type="text/ng-template" id="one.html"> | |
<div>This is first template</div> | |
</script> | |
<script type="text/ng-template" id="two.html"> | |
<div>This is second template</div> | |
</script> |