how does aurajs sandbox.on() and sandbox.emit() works?

238 Views Asked by At

I am new to auraJS and have gone through documentation but did not understand what is the role of sandbox in application. According to docs sandbox.on() is subscriber(listener) and sandbox.emit is publisher. but what are the argument passed in these functions and how i can call a function of other component with sendbox.emit(). i have code in the application like

sandbox.emit('layout:add-requested', this.collection, layoutModel);

and through debugging i come to know above line of code calls renderAddLayout() of other component's view. but i could not find any relationship or asynchronous call which can trigger the renderAddLayout() function();

0

There are 0 best solutions below