S
S
Stricker2014-04-26 23:31:16
Angular
Stricker, 2014-04-26 23:31:16

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

1 answer(s)
R
Ruslan Lopatin, 2014-04-27
@lorus

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 question

Ask a Question

731 491 924 answers to any question