I created a function, but I do not know why when I call this function the return of it comes as undefined.
follow the code
function serviceDetails(id){
//Service of the wall of cards (Grid Home page).
var _PATH_SERVICE = _app.parseBaseUrl('{{httpsBaseUrl}}relay/moment/'+id);
//MOCK
// var _PATH_SERVICE = '/wall.json';
//AJAX GET service.
_utils.Ajax.get(_app.parseBaseUrl(_PATH_SERVICE))
.done(function(result) {
//console.log(result);
//console.log(result);
//details = result;
return result;
})
.fail(function() {
console.log('Fail in service of wall.');
});
}