title: Angular2 - How to use string enums with *ngIf
body: <p>How do I pass <code>enum</code> to a function when I use <code>*ngIf</code> in Angular?</p>
  
  <p>I have the follow code:</p>
  
  <pre><code>export enum RoleType {
      User='User',
      Admin='Admin'
  }
  </code></pre>
  
  <p><strong>component function</strong></p>
  
  <pre><code>public hasAccess(role: RoleType) {
     //check role type and return true or false
  }
  </code></pre>
  
  <p><strong>component html</strong></p>
  
  <pre><code>&lt;div id="adminDiv" *ngIf="hasAccess('Admin')"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When I build this, it keeps complaining. It cannot convert the string to the enum, is there a way around this?</p>