Best approach for app with 2 different type of USERS, upon LOGIN render different UX for each

I am modifying a sideMenu app with Ionic and this is my scenario…

USERS will be able to login… There will be pilots and owners. The app will be pretty much the same exact for both types of users EXCEPT for the Owner having 1 extra choice in the side menu. Something that the pilot will not see while logged in under the pilot ‘experience’ Does this make sense?

:::My Question:::

What would be the best way to approach this? creating 2 controllers for each user login? or having one controller and figuring out the logic inside of it?

Does anything else come to mind that I did not ask or think of?

try to avoid much duplicated code --> if you app grows you will be at a point where you do not were you have implemented something and where not.

In the sidemenu -> check if the user is logged in as owner --> show the additional menu entry.
For this additional state/states you can use ui-routers resolve-functionality to check before entering this view, if the current user is an owner --> if not redirect to the startpage of your app.

1 Like

resolve functionality you say? Great timing on answering my post because I an currently running into similar stuff… I will read up on this… Thank you!