Trying to find a way to manage module controls is proving to be a bit challenging for me. Setting up an accordion is not the issue at hand.
Let's imagine I have 4 different modules: Module1, Module2, Module3, and Module4.
For desktop:
- all modules will be displayed on the main route '/#'. Data calculations will take place for each of them.
For mobile:
- only links to the modules will be visible on the page.
- each module will appear after clicking a link that routes to /#/module1/:data
$routeProvider.when('/', {
controller : main controller that loads and displays all other modules on the page
// but for mobile, only display links
}
when('/module1', {
// specific module loading for mobile only
Each module will have two views:
- a mobile view (on a separate page)
- a desktop view on the main page
When referring to a module, it doesn't necessarily mean an AngularJS module.
I'm unsure about the best approach to handle this situation.
I've been considering using routers with certain rules within controllers and resolves, or possibly utilizing $states.