CQRS pattern applied to Angular directives