code: function generateRouteHelperForStateConfig(stateConfig, serviceObj) {
          serviceObj[stateConfig.name] = function() {
              var args = arguments; // need to store ref before using in fns below
              var params = {};
              var argIndex = 0;
  
              if (stateConfig.pathParams) {
                  stateConfig.pathParams.forEach(function(pathParam) {
                      params[stateConfig.pathParams[pathParam]] = args[argIndex++];
                  });
              }
  
              if (stateConfig.queryParams) {
                  stateConfig.queryParams.forEach(function(queryParam) {
                      params[queryParam] = args[argIndex++];
                  });
              }
  
              return getRouteHelperReturnObj(stateConfig.name, params, args[argIndex]);
          };
      }
docs: ////////////////////////////////////////////////////// HELPER FUNCTIONS //////////////////////////////////////////////////////