Update examples to use controllerAs since $scope is considered bad practice now
Opened this issue · 5 comments
just thought I'd throw the idea out there.
Maybe the examples could be updated to implement a more new best practice?
Also if you're injecting $scope you might as well just use $scope.$watch right?
Yes, this seems like an excellent idea. I'd love not having to inject $scope and still haven't figured out how to do it.
We're using rx.angular on a Angular 1.5 project that's being written from scratch and we're trying to not use $scope anywhere if we can help it, because this is "the angular way" now. Rx.angular is almost the only reason we're injecting $scope anywhere now.
Same for us angular 1.5x with $scope only due to RxJS
I am also looking for a way to leave &scope in the dust
I created this simple way of using the $createObservableFunction without using $scope, you can technically wrap it in a service and use the 'rx' injection from rx-angular instead of a global rx object. It's not elegant but it works.
https://gist.github.com/Herman-Scheer/22f49bbbb10f2ef22ffdfc83935de6c5