Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Update examples to use controllerAs since $scope is considered bad practice now #131

Open
MarkPieszak opened this issue Jan 29, 2016 · 5 comments

Comments

@MarkPieszak
Copy link

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?

@Roaders
Copy link
Contributor

Roaders commented Mar 17, 2016

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.

@samal-rasmussen
Copy link

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.

@mickdelaney
Copy link

Same for us angular 1.5x with $scope only due to RxJS

@Martin-Andersen
Copy link

I am also looking for a way to leave &scope in the dust

@ghost
Copy link

ghost commented Oct 27, 2016

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants