Skip to content

Instantly share code, notes, and snippets.

@scottadamsmith
Created April 23, 2017 03:08
Show Gist options
  • Save scottadamsmith/a577a5b8ff785ee868accf87ca6ad6a2 to your computer and use it in GitHub Desktop.
Save scottadamsmith/a577a5b8ff785ee868accf87ca6ad6a2 to your computer and use it in GitHub Desktop.
ES6 imports w/ ES5 Angular service
import SampleModule from 'modules/some.module';
angular.module('main-app', [SampleModule])
.run();
import sampleService from 'services/some.service';
export default angular.module('some-module', [])
.service('sampleService', sampleService)
.name;
export default function sampleService ($q) {
this.sampleServiceValue = 'sampleServiceValue';
};
sampleService.$inject = ['$q'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment