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

binding observables to common directives #79

Open
sirbarrence opened this issue May 11, 2015 · 1 comment
Open

binding observables to common directives #79

sirbarrence opened this issue May 11, 2015 · 1 comment

Comments

@sirbarrence
Copy link
Contributor

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.

@sirbarrence
Copy link
Contributor Author

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.

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

1 participant