Search Posts

Category: sockets

populate and refresh html table using

I am making an application on using Node.js and angular as fronthand. There I am getting one text file which is log information of users and continously growing. The data is as below, 13:24:24:007,Peter,male,3720,yes 13:24:24:007,John,male,1520,yes 13:24:24:023,John,male,9720,yes 13:24:24:023,Mario,male,9820,no 13:24:24:023,Katy,female,4320,no 13:24:24:038,John,male,3620,no ….. ….. I want to show the aggregate report data in table format to the client html page for dashboard kind of thing as below. username firstlogin lastglogin minamount maxamount Peter 13:24:24:007 13:24:24:007 3720 3720 John […] which is in my Angularjs controller, is duplicated every time I access to the controller

I have an app with Node.js, Angularjs and, I have a controller for maps.html that receives events from other clients by like that: app.controller(‘mapCtrl’, function ($scope, $http, socket) { vm = this; //…. socket.on(‘finalizarRuta’, function(data) { //Other function from the controller vm.funciones.almacenarHistorialFinalRuta(); }); }); All work good but, when Im going to other page, and later I return to maps.html, I reactive the controller and the Socket.IO functions are activated 2 or more […]