Hi Pieter, I'm not sure I understand what you are trying to reach. Is it that you want your javascript to run only when the page comes into view? Or is the problem that your javascript is so huge that you need to split it up and load it in different stages of your app?
I suspect you are new to AngularJS?, and to building web apps too? You can split your script up as much as you like, just make sure it is all loaded before you start your app. That means, load all script files from your index.html There are means to automate this, and also way's you should organize your code, but that's not the point here. You should move your data-loading into services<http://docs.angularjs.org/guide/services>. Those are singletons, which means those are instantiated only on the first call. Your controllers are instantiated and destroyed when they come into scope. Does this help? don't hesitate to ask if you have more questions! 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.
