Answer the question
In order to leave comments, you need to log in
How to use nested angularjs controllers?
Good afternoon!
I'm writing a one-pager in angularjs, but due to the huge number of pages with a lot of nesting, I get huge controller names for each specific page (userAccauntAddPageCtrl for example).
Is it possible somehow to avoid similar controller names and use nested controllers, user.account.add for example?
Or maybe there is a better approach to attaching controllers to a page?
Answer the question
In order to leave comments, you need to log in
https://github.com/angular-ui/ui-router it is best to bind controllers to the page using ui-router moreover, there you can really use the name like this 'index.user.profile' in theory it should be a nested controller in the user controller which is nested in index which is global. Although this is not required.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question