code: function prefixHomeResourcesWithApiHost(definition, apiHost) {
  
                      if (!apiHost) {
  
                          return definition;
                      }
  
                      var prefixWithApiHost = function (url, host) {
  
                          return toAbsoluteUrl(url, stripTrailingSlash(host));
  
                      };
  
  
                      if (definition.href) {
  
                          definition.href = prefixWithApiHost(definition.href, apiHost);
  
                      }
                      if (definition['href-template']) {
  
                          definition['href-template'] = prefixWithApiHost(definition['href-template'], apiHost);
  
                      }
  
                      if (definition['href-vars']) {
  
                          angular.forEach(definition['href-vars'], function (hrefVarsPath, hrefVarsKey) {
  
                              definition['href-vars'][hrefVarsKey] = prefixWithApiHost(hrefVarsPath, apiHost);
  
                          });
                      }
  
                      return definition;
                  }
docs: /*
  Prefix the definition of a json-home Resource href-template and href-vars with the host if
  the host was specified and the url are absolute (starting with '/')
  
  @param {object} definition a json-home Resource
  @param {string} host the host (protocol with hostname with port)
  @returns {string} definition the modified definition