Consider a certain route let's say myapp\profile which has two modes (buyer/seller) What i would like to achieve is:
- keep the same route url for both modes
- Alternate the view with different HTML files (lets say buyer.html, seller.html), of course each view has it's view model.
- Sharing some logic between the two modes.
- I would like to have a controller/logic to each mode
What i already considered:
- Thought about using ui-router's sub states, but I dont want to change the url.
- Thought about creating this 'profile' route and while navigating to it, figure the mode (buyer/seller), and then $state.go to a new state (but again, i would like to keep same route name at the end so it's not ok)
- Ideally thought i could navigate to my shared controller and then render the correct view and controller, but this idea kinda messed up me.
Could you share what is a clean way of doing this?