lib/index.js
function controllerLinks(route, controllerAction, reverseRouteService) {
  const controllers = sails.controllers;
  const controller = _.first(controllerAction.split('.'));
  const path = route.path;
  const actions = _.get(controllers[controller], '_config.links') || [];
  let result = {};
  result[path] = [];
  _.each(actions, function (action) {
    return result[path].push({
      rel: action,
      link: reverseRouteService({controller: controller + '.' + action, args: []}, false)
    });
  });
  return result;
}
function controllerLinks(route, controllerAction, reverseRouteService) {
  const controllers = sails.controllers;
  const controller = _.first(controllerAction.split('.'));
  const path = route.path;
  const actions = _.get(controllers[controller], '_config.links') || [];
  let result = {};
  result[path] = [];
  _.each(actions, function (action) {
    return result[path].push({
      rel: action,
      link: reverseRouteService({controller: controller + '.' + action, args: []}, false)
    });
  });
  return result;
}
function controllerLinks ( route , controllerAction , reverseRouteService ) { const controllers = sails . controllers ; const controller = _ . first ( controllerAction . split ( '.' ) ) ; const path = route . path ; const actions = _ . get ( controllers [ controller ] , '_config.links' ) || [ ] ; let result = { } ; result [ path ] = [ ] ; _ . each ( actions , function ( action ) { return result [ path ] . push ( { rel : action , link : reverseRouteService ( { controller : controller + '.' + action , args : [ ] } , false ) } ) ; } ) ; return result ; }
Create an array of pagelinks.
@param controllers
@param reverseRoute
@param controllerAction
@returns {Promise.<Function>}
Create an array of pagelinks .