[url=http:/civis/viewtopic.php?p=28338329#p28338329:4onumfp0 said:
Oelph[/url]":4onumfp0]Yep you're right. I've been learning Angular with some of last years tutorials and they've been using a pre 1.3 version, so I was able to get away with controllers in the global scope.
Interesting. The app that I'm working on is still on 1.0.8 (until 1.3 there really weren't any features that made it worth the rebuild necessity that was introduced with 1.1) and I wasn't aware that you could do that).
Thanks for your reply though. I didn't think anyone had seen it when I edited my OP
No problem. I had a few minor syntax issues in my original answer that kept it from recognizing the app so it took a bit longer than it should have to get put up in a working state.
I recognize that you're learning the platform but I highly recommend you start breaking things out into modules with separate files for controllers, directive, etc when you get a bit more comfortable with it. When I get some time at work tomorrow I'll take a look at my skeleton project and see what I can post as an example for how a module, controller, service and directive js file should look (nothing particularly special, just making use of javascript's loading and scopes). An Angular app is going to end up with a
lot of js files and if the components of a module are all together it will make it very difficult to not only work on but to encapsulate functionality.
You're lucky. The Angular documentation has gotten a
lot better since I started using it a year and a half ago.