-
Notifications
You must be signed in to change notification settings - Fork 89
Working with ControllerAs #109
Comments
+1 I'm wondering the same thing. |
apparently Rx adds a a few new things on
one thing I can't figure out still, have to turn |
+1 |
I think the point here is to not use watchers with scope. |
@SmoshySmosh I'm not sure I get what you're saying? I just wanted to know how to create streams out of |
I could be wrong on this, but I believe that the topic was about using the controllerAs syntax so you can avoid the use of $scope. It would be nice to use rx to actually observe objects without the use of observeOnScope (which makes a watcher). Maybe something like observeOnVm? |
Personally, even before using Rx, I rarely, if ever, use $watch in controllers. I find more effective to use ngChange, ngClick, etc. |
to turn an Angular event into an Observable, use Does that answer all your questions @agzam? |
I think the point is similar to my issue #123 . I used to use ScopeSchedular to do an apply whenever an observable pushed a message but this has now gone. Using ScopeSchedular I didn't have to inject a scope into my controllers at all and apply got called whenever I needed it to without me having to do anything within my controllers. |
But it does not fixing issue with notyfing angular to update scope after onError, does it? |
SafeApply can be used for noNext, error and complete: https://github.com/Reactive-Extensions/rx.angular.js/blob/master/src/safeApply.js |
Can someone please explain how to use it with
controllerAs
I know that you can watch on the controller using observeOnScope, also you can create streams out of ng events like this:
But then how can I use
rx
to$watch
and do events without having to inject bothrx
andobserveOnScope
?The text was updated successfully, but these errors were encountered: