Answer the question
In order to leave comments, you need to log in
AngularJS Route previous page controller work after transition
Greetings. Such a question, here we have a regular ng-view. As I understand it, after each transition, the controller is created anew, as a result, we have everything from scratch. Is there a way for the controller to continue to work after the transition, until we want to destroy it? Those. we were in the chat route, moved somewhere, and the chat continues to receive messages and adds them to the view
Answer the question
In order to leave comments, you need to log in
This is exactly the case when you need a service, not a controller. The controller that displays messages will be the client of such a service.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question