Search Posts

Category: sockets

RemoveAllListener method is not being called at all in Angular

I am working with Angular Js (1.x). I have used sockets in my application. Bur now I feel to introduce a method who keeps destroying the sockets, for cleaning up purpose. So I added a new method in my socket service which is “removeAllListener()”. This method is not at all being called. I am doing it for the first time. I am pasting my code below. Please look at it and help me to find […]

Secure communication between Angular and NodeJS

I have the following structure: front-end: Ionic 2 (only browser platform / based on Angular 2) back-end1: NodeJS (the domain is secured with a SSL certificate) back-end2: NodeJS Front-end and back-end1 are on the same server with the same domain https://www.domain.de and https://api.domain.de Everything i found is always based on user-authentication, but i don’t have users. I just want to make the connection from front-end to back-end1 secure and that only the front-end can communicate […]

populate and refresh html table using socket.io

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 […]

Socket.io which is in my Angularjs controller, is duplicated every time I access to the controller

I have an app with Node.js, Angularjs and Socket.io, I have a controller for maps.html that receives events from other clients by socket.io 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 […]