title: angularjs secure role based tabs
body: <p>I am developing an application in which i am using angularjs at client side and java,spring at server side,all communication is in the form of JSON.</p>
  
  <p>The problem i am getting is about security.
  I have multiple roles, user can have and based on these roles,tabs on UI are visible or not.</p>
  
  <p>If i use JSP then it is easy to use taglib for this problem because jsp is compiled at server and returned html will not have html section for hidden tabs and there is no way by which end-user can see these tabs or their URL part.</p>
  
  <p>But how to solve this problem in angular based application because whatever code i write in angular file,user can change it by firebug etc. and can see the tabs and their URLs. </p>
  
  <p>example : i have following in my html :</p>
  
  <pre><code>&lt;a href="users"&gt;Users&lt;/a&gt;
  </code></pre>
  
  <p>I want to hide this thing completely if user is not having required role.</p>
  
  <p>One solution can be writing some directive but user can edit the script of this directive and can see this thing in html. </p>