Self resolving objects for angular promises.
function get(enumType){
var enums = $resource('/enums/:locale').get({locale:'en'});
var promise = enums.$promise.then(function transformResult(enums) {
return enums[enumType];
});
var value = Resolvling.resolvingWith(promise);
return value;
}