I am currently doing some reading on the RxJS libraries and taking some time to go through some of the classes offered by some of its architects and contributors with the goal of incorporating this knowledge into an angular2 application. I am finding it difficult though because I can't seem to figure out how to change the syntax so I can use RxJS like i am seeing in any of the examples that aren't angular2 specific. For instance, if I try to create an observer in a constructor:
this.$mouseObserver = Rx.Observer.create(
function (x) {
console.log('Next: %s', x);
},
function (err) {
console.log('Error: %s', err);
},
function () {
console.log('Completed');
});
Rx always comes up undefined, even after importing it. Observer and Observable import fine, as well as the methods for them. Am i missing something basic? Every piece of documentation for RxJS starts almost everything with Rx.
but I haven't seen a single Angular 2 tutorial that uses that syntax.