Answer the question
In order to leave comments, you need to log in
How to make reading into an array of characters?
Here is the code that throws an error:
c(jj) = fgets(F(jj));
The error is:
Unable to perform assignment because the left and right sides have a different number of elements.
Answer the question
In order to leave comments, you need to log in
Even without being familiar with Socket.io, I can say that every time you instantiate a controller, you subscribe to an event.
Who will unsubscribe? Or do you think that he will somehow magically unsubscribe to you when the controller is removed?
function onGetOne() {
}
socket.on('tickets:getOne:success', onGetOne);
$scope.$on('$destroy', function() {
socket.removeListener('tickets:getOne:success', onGetOne);
});
Socket work should be encapsulated in a separate service with a higher abstraction for controllers, directives, and other services.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question