mardi 2 août 2016

How can i send data from one module to another?

i want to send data from one of my modules to another module, which handles the data.

I got three modules: Requester, Controller, Displayer

Controller: Inits Requester and Displayer

Requester: Makes a server request and gets response data stored in an variable responseData

Now i want to send this variable to the Controller and from there it should be passed to the Displayer

I don't know how i should implement this, because I'm new to JavaScript and those Design Patterns.

For this context I'm using the Revealing Module Pattern...

App.Displayer = (function() {...})();
App.Controller = (function() {...})();
App.Requester = (function() {...})();

Aucun commentaire:

Enregistrer un commentaire