title: angular API for directives
body: <p>what do you think of the approach to create directives that expose services?</p>
  
  <p>Example have a directive to do then get requests the UI would have just that:</p>
  
  <pre><code>&lt;api-http id="clients" uri="rest/clients"&gt;&lt;/api-http&gt;
  
  &lt;button ng-click="clients.get()"&gt;search clients&lt;/button&gt;
  
  &lt;table&gt;
  &lt;tr ng-repeat="client in clients.results.data"&gt; 
  &lt;td&gt;{{client.name}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>api-http is a policy that exposes an api rest via ui, the button I call the api which was exposed in the id, calling the get that stores the result in api under the variable result, and display the resultsenter code here in the table below, which They think of this approach?</p>
  
  <p>this does not exempt the use of the controller as we could have a controller and the controller to call the api visual component.</p>