Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I've been researching using Google for a few days now. Going in circles, maybe someone with experience could give me a few pointers on the concepts.

Scope:

  • Need a scalable mobile site using angular;
  • Using "best practices for angular app structure" for folder/file structure;
  • Lots of /sections to keep controllers/views/tests organized as app scales;
  • Need to use require.js to load on demand, so initial page loads fast on a mobile device (as opposed to dumping all the required files in <head> of the index.html page [>1 mb]);

This seems the best starting point I've come across, after looking into different seeds and yeoman generators.

Questions:

  1. How would you load services on demand? A service may be used by several controllers. Want to load it on an as-needed basis as a dependency.
  2. What's a good way to decouple the routes so the routes file doesn't become too large? ie. an /app/section could have several /app/section/subsection, which could have several /app/section/subsection/action calls. I'm wondering if perhaps the main controller for each section could handle routing for its submodules, or perhaps use a routing file in each /app/section folder...?
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.