I have a problem that I cannot find a proper answer to.
Ok I have data that i collect from api for example
Admin
User
user profile
user stats
For this I have
adminCtrl
userCtrl
userprofileCtrl
userstatsCtrl
The problem is when i in my controllers like if I I want to view userprofile then userprofileCtrl get routes from url like admins/:admin_id/users/:user_id/profile and I have to collect all the data like admin, user, and the profile in every controller to be able to print all the details in my view about the user.
Can I nest the controllers in some way? It leads to a lot of dry in controllers.
Also wondering what best practice for printing error messages is, i have apiservice wich makes all requests to my api, should i set the messages in service an how, rootScope?