What are best practices for routes and controllers

questionsCategory: QuestionsWhat are best practices for routes and controllers
Narendra asked 2 years ago

HiĀ 
what’s the best way to associate a route (let’s say “view-profile”) to a specific controller method (ProfileController.viewProfile)? Is this a right pattern in AngularJS?
I am currently working on a single page web application. An User can login and fill their profiles with data and share those with other subscribers. I’ve imagined this schema:
the users data are provided by a UserService, using REST APIs to recover profiles information;
the profiles related pages are managed by a unique controller (ProfileController);