Instead of doing this:
export default function (campaignService) {
return {
scope: {},
template: require('./my-directive.html'),
link: function(scope) {
campaignService.getCampaigns().then((campaigns) => {
scope.campaigns = campaigns;