How i get the data sent from main process to angularjs


#1

Hi i know that for sending data from the main process to renderer process we use ipc, but how can i get that data in angularjs?


#2

You would use the ipc module just as you would any other time. The only caveat is that, since the event fired is outside of angular’s scope, you may not see changes in data immediately without using some of the normal angular hacks like…

ipc.on(‘channel’,function(data){
$timeout(function() {
// assign the data in angular’s scope here
},0);
});


#3

Thanks!! that helped me alot