Skip to content

Instantly share code, notes, and snippets.

@eccegordo
Created July 12, 2015 04:50
Show Gist options
  • Save eccegordo/6b7db0addef88bfd3bb1 to your computer and use it in GitHub Desktop.
Save eccegordo/6b7db0addef88bfd3bb1 to your computer and use it in GitHub Desktop.
Service Initializer
import MyService from 'app-name/services/my-service';
export default {
name: 'MyServiceInitializer',
initialize: function(container, application) {
container.register('my-service:service', MyServiceInitializer, { singleton: true });
// inject onto routes, controllers, etc
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment