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

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.

主站蜘蛛池模板: 阿拉尔市| 桦川县| 延边| 武安市| 澳门| 天等县| 石景山区| 苏尼特右旗| 焦作市| 浮梁县| 兰州市| 安徽省| 乌什县| 邓州市| 隆德县| 梧州市| 广宗县| 大悟县| 容城县| 基隆市| 壤塘县| 乌拉特后旗| 阳春市| 社会| 浦江县| 扶绥县| 麻栗坡县| 兰溪市| 宁都县| 德阳市| 五大连池市| 齐河县| 乐业县| 桐柏县| 绥江县| 玉门市| 梁河县| 潼南县| 武鸣县| 汨罗市| 民权县|