Change the code to this:
return {
getallrates: function(source, $scope){
return getRate(source, $scope);
},
init: function(xml) {
parseXml(xml);
},
}
4
solved Return objects from nested functions?