Directive with Observe promise pattern

12 views
Skip to first unread message

Junio Branco

unread,
Mar 30, 2015, 3:17:14 AM3/30/15
to ang...@googlegroups.com
Hi,
I have been questioning myself with the following pattern:
- Directive A listens to changes on service A (it holds a promise)
- Directive B changes the data in Service A and fires a notify on the promise.
- Directive A gets the notification and calls a function with the new data.

I find this puzzling as it seems rather anti pattern but I have seen this pattern used several times. How would one reuse its directive? As there is no dependency on scope but solely on the service data?
Reply all
Reply to author
Forward
0 new messages