Sharing Top Content from the Angular-sphere.

Communicating between AngularJS Directives to share data

  • Each instance of the cstLabel directive makes a call to the same singleton service, pretty much at the same time, but with a cold cache each call would find the cache empty and go to the server to get the data .
  • I have a cstLabel directive which takes a numeric identifier and uses that to lookup the friendly text to show to the user.
  • When multiple instances of this directive are in the page, they each call the lookupService to get the friendly text.

Read the full article, click here.


@matttester: “Communicating between #AngularJS #Directives to share data”


How to share data between AngularJS directives to prevent multiple calls to the server.


Communicating between AngularJS Directives to share data