It really depends on how you model your application and what javascript framework you are using.
You could make an ajax call every time an event is triggered or route is changed on client-side and decided based on the result you get back from your server. You shift your roles and permission checking to server side which in return will by slightly slow but you have much better system in terms of security since on every call you roles are checked against the database.
Alternatively you could load your roles as part of your initial page load and cache them maybe in your html header or in localStorage and then you can check against these roles to perform actions.