docs: function _loadDependencies(moduleName, localParams) {
                      var loadedModule,
                          requires,
                          diff,
                          promisesList = [],
                          self = this;
  
                      moduleName = self._getModuleName(moduleName);
  
                      if (moduleName === null) {
                          return $q.when();
                      } else {
                          try {
                              loadedModule = self._getModule(moduleName);
                          } catch (e) {
                              return reject(e);
                          }
                          // get unloaded requires
                          requires = self.getRequires(loadedModule);
                      }
  
                      angular.forEach(requires, function (requireEntry) {
                          // If no configuration is provided, try and find one from a previous load.
                          // If there isn't one, bail and let the normal flow run
                          if (angular.isString(requireEntry)) {
                              var config = self.getModuleConfig(requireEntry);
                              if (config === null) {
                                  moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.
                                  return;
                              }
                              requireEntry = config;
                              // ignore the name because it's probably not a real module name
                              config.name = undefined;
                          }
  
                          // Check if this dependency has been loaded previously
                          if (self.moduleExists(requireEntry.name)) {
                              // compare against the already loaded module to see if the new definition adds any new files
                              diff = requireEntry.files.filter(function (n) {
                                  return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0;
                              });
  
                              // If the module was redefined, advise via the console
                              if (diff.length !== 0) {
                                  self._$log.warn('Module "', moduleName, '" attempted to redefine configuration for dependency. "', requireEntry.name, '"\n Additional Files Loaded:', diff);
                              }
  
                              // Push everything to the file loader, it will weed out the duplicates.
                              if (angular.isDefined(self.filesLoader)) {
                                  // if a files loader is defined
                                  promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {
                                      return self._loadDependencies(requireEntry);
                                  }));
                              } else {
                                  return reject(new Error('Error: New dependencies need to be loaded from external files (' + requireEntry.files + '), but no loader has been defined.'));
                              }
                              return;
                          } else if (angular.isArray(requireEntry)) {
                              var files = [];
                              angular.forEach(requireEntry, function (entry) {
                                  // let's check if the entry is a file name or a config name
                                  var config = self.getModuleConfig(entry);
                                  if (config === null) {
                                      files.push(entry);
                                  } else if (config.files) {
                                      files = files.concat(config.files);
                                  }
                              });
                              if (files.length > 0) {
                                  requireEntry = {
                                      files: files
                                  };
                              }
                          } else if (angular.isObject(requireEntry)) {
                              if (requireEntry.hasOwnProperty('name') && requireEntry['name']) {
                                  // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.
                                  self.setModuleConfig(requireEntry);
                                  moduleCache.push(requireEntry['name']);
                              }
                          }
  
                          // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.
                          if (angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {
                              if (angular.isDefined(self.filesLoader)) {
                                  // if a files loader is defined
                                  promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {
                                      return self._loadDependencies(requireEntry);
                                  }));
                              } else {
                                  return reject(new Error('Error: the module "' + requireEntry.name + '" is defined in external files (' + requireEntry.files + '), but no loader has been defined.'));
                              }
                          }
                      });
  
                      // Create a wrapper promise to watch the promise list and resolve it once everything is done.
                      return $q.all(promisesList);
                  }