Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative ways for inter-module communication #9

Open
morion4000 opened this issue Jun 18, 2015 · 2 comments
Open

Alternative ways for inter-module communication #9

morion4000 opened this issue Jun 18, 2015 · 2 comments

Comments

@morion4000
Copy link
Contributor

After having a chat with @windmaomao, we agreed that we can/should implement different ways of exchanging data between modules and between modules and the apps.

@morion4000
Copy link
Contributor Author

sisModules.init allows sending options as the second parameter. If the scope property is provided then the modules are going to use it, if not, a new isolated scope on $rootScope is going to be used.

eg:

sisModules.init(function() {}, {scope: $scope});

@windmaomao
Copy link

Thank you very much for the effort, for now, if we can mention in the current documentation that one of the possible way to send data in and out of module is using

events.publish('facility-user', data);

and

events.subscribe('facility-user', function(data) {});

that'll be great. The above publish and subscribe works both in main app controller and modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants