Added dependency injection for the directive and service.