code: function (options) {
              if (!isStringValid(options.key)) {
                  throw new TypeError('Unable to load data, a key is not a non-empty string.');
              }
  
              if (!isStringValid(options.urlTemplate)) {
                  throw new TypeError('Unable to load data, a urlTemplate is not a non-empty string.');
              }
  
              var errorHandler = options.loadFailureHandler;
              if (errorHandler !== undefined) {
                  if (!angular.isString(errorHandler)) {
                      throw new Error('Unable to load data, a loadFailureHandler is not a string.');
                  } else errorHandler = $injector.get(errorHandler);
              }
  
              var loaders = [],
                  tables = [],
                  deferred = $q.defer();
  
              function addTablePart(table) {
                  tables.push(table);
              }
  
              for (var part in parts) {
                  if (hasPart(part) && parts[part].isActive) {
                      loaders.push(
                        parts[part]
                          .getTable(options.key, $q, $http, options.urlTemplate, errorHandler)
                          .then(addTablePart)
                      );
                  }
              }
  
              if (loaders.length) {
                  $q.all(loaders).then(
                    function () {
                        var table = {};
                        for (var i = 0; i < tables.length; i++) {
                            deepExtend(table, tables[i]);
                        }
                        deferred.resolve(table);
                    },
                    function () {
                        deferred.reject(options.key);
                    }
                  );
              } else {
                  deferred.resolve({});
              }
  
              return deferred.promise;
          }
docs: @ngdoc event
  @name pascalprecht.translate.$translatePartialLoader#$translatePartialLoaderStructureChanged
  @eventOf pascalprecht.translate.$translatePartialLoader
  @eventType broadcast on root scope
  
  @description
  A $translatePartialLoaderStructureChanged event is called when a state of the loader was
  changed somehow. It could mean either some part is added or some part is deleted. Anyway when
  you get this event the translation table is not longer current and has to be updated.
  
  @param {string} name A name of the part which is a reason why the event was fired