I’m making an application which will have two types of users - providers and customers - and I want to render different layouts for each.
What is considered the best practice for accomplishing this?
Right now I’m using the Iron Router onBeforeAction to check user class and set the correct template, but it seems a little twitchy. While running the application locally at least - the primary layout is shown quickly before the correct layout is rendered.
I should also mention that I’m structuring the application in packages, and will ideally move the the separate user classes into two different packages, which is again separated from the core package.