angularjs - How inline nested fuction in javascript? -


consider example angular $resource , springdatarestadapter angular-spring-data-rest:

var resource = $resource("url/:id", {id: '@id'}, {query: {method: 'get', isarray: false}});  $scope.questionary.query({}, function callback(data) {     springdatarestadapter.process(data).then(function (processedresponse) {     } }); 

springdatarestadapter.process has same semantic callback.

how pass springdatarestadapter.process instead of callback chained then call?

updated

rewrote question real world example.


Comments