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 theindex.html
page [>1 mb]);
This seems the best starting point I've come across, after looking into different seeds and yeoman generators.
Questions:
- 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. - 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...?