Simple console directive, revised using provider
Just quick comments, as so far your code looks good

ng-class can receive an ng-model variable, the class being displayed matching the ng-model content, so you can directly state

 ng-class="{event.type}"


Maybe you want to extract the logic to check if the event exists to some functions with proper naming

    if (events.length &gt; 0 &amp;&amp; isFirstEvent(events, type, data)) {


Mine is probably not the best example but it will help to have an idea what's happening

Plus extracting the html of the directive to a template will help readability and maintainability

Hope it helps!