Angular 2 show/hide components/parts based on roles/claims
<p>I am trying to understand best practices about security aspect of angular application.
Lets say i have a view with details screen of the model. What i want to be able to do, based on roles/permissions for the given user (gotten from jwt claims, for example) is:</p>

<ol>
<li><p>enable/disable certain input fields based on the fact if user is/isn't of certain role so, effectively some roles can edit the record and some can't</p></li>
<li><p>show/hide 'save' button again based on role, again to prevent certain roles from editing</p></li>
</ol>

<p>i understand there is canActivate but if feels like on a component level and what i need is a bit more granular approach to change things within components based on roles.</p>

<p>what are the best practices?</p>