官术网_书友最值得收藏!

Installing RxJS

RxJS is divided into modules. This way, you can create your own bundle with only the modules you're interested in. In this book, we will always use the official bundle with all the contents from RxJS; by doing so, we'll not have to worry about whether a certain module exists in our bundle or not. So, let's follow the steps described here to install RxJS.

To install it on your server, just run the following command inside a node project:

    npm i rx@4.1.0 -save

To add it to a HTML page, just paste the following code snippet inside your HTML:

<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.1.0/rx.all.js"> 
</script>
For those using other package managers, you can install RxJS from Bower or NuGet.

If you're running inside a node program, you need to have the RxJS library in each JavaScript file that you want to use. To do this, add the following line to the beginning of your JavaScript file:

var Rx = require('rx'); 

The preceding line will be omitted in all examples, as we expect you to have added it before testing the sample code.

主站蜘蛛池模板: 始兴县| 沁阳市| 旬邑县| 信丰县| 砚山县| 巴林右旗| 博兴县| 老河口市| 泗洪县| 高碑店市| 乐业县| 萨迦县| 江西省| 松桃| 丘北县| 夏津县| 浪卡子县| 江华| 涡阳县| 东乌| 鱼台县| 临江市| 兴海县| 志丹县| 东宁县| 尉氏县| 刚察县| 龙南县| 神农架林区| 静安区| 项城市| 板桥市| 肥西县| 昌都县| 克拉玛依市| 天柱县| 温宿县| 大埔区| 阳东县| 应城市| 衡阳市|