Hi Sander, thanks for your answer! It perfectly makes sense to me!
Btw, I've opened a feature request regarding this situation (https://github.com/angular/angular/issues/5275). I think angular 2 should allow the developer to choose whether to destroy the component or not. Leave your opinion there please. Regards, Luiz Em quinta-feira, 12 de novembro de 2015 17:12:16 UTC, Sander Elias escreveu: > > Hi Luiz, > > If a route changes, the controllers will be destroy'd reinitialized. If > you want to save state in between those instances, you have to actively > store that. Can be anywhere, but a service might be the easiest solution. > To ease you in doing that, you can utilize the life-cycle hooks that are > provided by the new router. > I'm not sure on the naming, but you can store the unfinished state in > deactivation of the component, on activation you can then detect that, and > put the info back into your component. > > Does that makes any sense to you? > > Regards > Sander > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
