Closed mato2000 closed 11 years ago
Hi, all controllers in a page are created right when the app starts. If you have external files and are using controllers in them, only they will get created the first time the page is visited.
If you want to do some work when the page is loaded, you have 2 options:
ngm-pagebeforeshow
directive in your page to call a function in your controlleronActivate
property to call a function every time your page is visited.Tobias
Oh, Ok. I think I can use ngm-pagebeforeshow for getting specific page data. Many Thanks! Matias.
I've got multiple pages in the same html, and each one associated to a different controller. Each controller calls to a service. When the app starts, all controllers are being instantiated, and therefore calls to the service which produce undesirable behaviour. I thought each controller was created when the page is loaded. is that right? if not, is there a way to workaround this?