Running the Code Examples
The code examples in this book are made for either the browser or Node.js. The context of the code should clarify in what environment to run the code.
Running RxJS Code in the Browser
If the code is meant to run in the browser, we’ll use the file rx.all.js, which you can find in the RxJS GitHub repository.[3] rx.all.js includes all the operators in RxJS, and it’s the easiest way to be sure all examples will work. Just load the script in the <head> section of your HTML document:
| | <html> |
| | <head> |
| | <script src="rx.all.js"></script> |
| | </head> |
| | ... |
| | </html> |
Keep in mind that it is a relatively big file and you may want to consider a smaller file, such as rx.js or rx.lite.js, for your projects if you’re not using all ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access