what do you think of the approach to create directives that expose services?
Example have a directive to do then get requests the UI would have just that:
<api-http id="clients" uri="rest/clients"></api-http>
<button ng-click="clients.get()">search clients</button>
<table>
<tr ng-repeat="client in clients.results.data">
<td>{{client.name}}</td>
</tr>
</table>
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?
this does not exempt the use of the controller as we could have a controller and the controller to call the api visual component.