title: Angular7 equivalent of C# attribute decorator
body: <p>I have a api method with an Authorize attribute that checks permissions</p>
  
  <pre><code>[Authorize(ReadIndexes)]
  public async Task&lt;IActionResult&gt; GetIndexes ()
  {
    ...
  }
  </code></pre>
  
  <p>Is there an equivalent way to decorate a method to check for permissions in Angular so the api call is not carried out if the permissions are not present</p>
  
  <pre><code>##????##
  getIndexes(): Observable&lt;Index[]&gt; {
    // dont want to check in the method like below
    if(checkPerms("ReadIndexes")===true){
      ...
    }
  }
  </code></pre>