Skip to content

Instantly share code, notes, and snippets.

@williamsbdev
Created July 21, 2015 01:18
Show Gist options
  • Save williamsbdev/5b20da286ae82a0fc79e to your computer and use it in GitHub Desktop.
Save williamsbdev/5b20da286ae82a0fc79e to your computer and use it in GitHub Desktop.
import Ember from 'ember';
var injection = function(key, name) {
return Ember.computed(function(propertyName) {
var objectName = name || propertyName;
return this.container.lookup(key + ':' + objectName);
});
};
export default injection;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment