Jquery function returning undefined

0

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.');
    });
}
    
asked by anonymous 30.03.2016 / 13:45

0 answers