Validations for roles with angular at the frontend
Hello everyone, I am currently using angular to build the frontend of my application and I would like to give me feedback on how it can be the best option to validate according to the user's role show or hide menu options or buttons with actions.
constantly make request to the back asking for permits, localStorage...
I thank you in advance that you can give me a viable and safe idea.
I'd suggest watching the series where @jeffreyway made laravel an SPA. Granted not Angular, but many SPA techniques apply.
Myself, in a MPA rather than all that @can and if's, I find it easier to have an index page for users and a separate indexadmin page for admins. Just my preference. That way it avoids all that showing/ hiding.