Reactive-Extensions/rx.angular.js

binding observables to common directives

Opened this issue · 1 comments

I'd like to be able to bind directives in the document directly to Observables on the scope instead of binding those directives to simple scope values that I have to update from safeApply() blocks. For instance, an Observable of booleans bound to directives like ngShow, ngIf, and ngDisabled would be very helpful for complex forms and reduce controller boilerplate.

Is that something you feel fits into the goals of rx.angular.js? Or is that somehow an anti-pattern? I'm somewhat new to RxJS, so I'm genuinely curious. But ReactiveCocoa provides something very similar.

Here's an article I wrote detailing how this could be done by decorating some of the factory ng directives.

Or TL;DR (plunker).

But I don't know if that's the best way to go for rx-angular itself. Perhaps a separate set of rx directives built from scratch would be better? Not sure.