AngularJS directives and services for the greater good