Closed akauppi closed 8 years ago
All I suggest is adding a line to the README (can suggest a PR if this gets a preliminary go-ahead).
I think that would work. I don't know why anyone would be against it.
PS: JSBin already supports adding RxJS 5, and the link they use is https://npmcdn.com/@reactivex/rxjs@5.0.0-alpha.8/dist/global/Rx.js
Here's a JSBin link if you just want it to work: http://jsbin.com/leyayi/1/edit?html,js,console
Uses the umd build of RxJS5 beta1: https://npmcdn.com/rxjs@5.0.0-beta.1/bundles/Rx.umd.js
This seems to have been answered adequately. Closing for now. @akauppi if you feel your issue is still unresolved, please reopen.
@blesh http://jsbin.com/leyayi/1/edit?html,js,console is running perfectly in chrome but in safari it is giving an error as show below. Same error with Beta 2.
@ziaukhan Safari doesn't like your arrow function. Switching the JSBin mode to ES6/Babel solves the problem.
In JsBin, I got error "Rx.Observable.just is not a function" in Firefox & Chrome. JsBin example : http://jsbin.com/vunuta/edit?html,js,console
HTML : script src="https://npmcdn.com/@reactivex/rxjs@5.0.0-beta.7/dist/global/Rx.umd.js">
Typescript :
Rx.Observable.from ([1,2,3]).subscribe(x => console.log(x)); // Work Rx.Observable.just (99).subscribe(x => console.log(x)); // Fail Rx.Observable.return (99).subscribe(x => console.log(x)); // Fail
Tx
I found why, Operation return / just are replace by operator of in rxjs5. https://github.com/ReactiveX/rxjs/blob/master/MIGRATION.md
For those wondering, the proper way to do so is:
npm install
Include it in your web project. BEWARE though: the major namespace (Rx) is undefined in the umd version, so instead of:
Rx.Observable.create
you should rather do:
var Rx = window['rxjs']; Rx.Obserable.create
.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
This seems to be possible, but is not really mentioned in the project README.md.
To use RxJS5 from a browser (global variables, no requirements management), use the UMD variant:
Then in HTML:
I believe in the transition from RxJS4 to RxJS5 I won't be the only one coming with a plain browser project. This would help in the transition, then eventually I might pick up packaging as well. All I suggest is adding a line to the README (can suggest a PR if this gets a preliminary go-ahead).