Hacker News new | ask | show | jobs
by Bahamut 4429 days ago
I guess this can clean logic flow in a controller, but here you end up with a bloated object instead.

The biggest problem I see though is if you want to save a reference to the unregister functions of the $watch callbacks.

Otherwise, this is a cool idea, although it falls a little short.

1 comments

> The biggest problem I see though is if you want to save a reference to the unregister functions of the $watch callbacks.

This is a valid criticism, thank you. I will try to put together a nice solution for this.

Of course you can always register/de-register watchers the normal way inside of the init method.

Yup, I'm aware - nice work on this so far!