code: function loadByURL(url) {
      /* Load the icon from embedded data URL. */
      function loadByDataUrl(url) {
        var results = dataUrlRegex.exec(url);
        var isBase64 = /base64/i.test(url);
        var data = isBase64 ? window.atob(results[2]) : results[2];
  
        return $q.when(angular.element(data)[0]);
      }
  
      /* Load the icon by URL using HTTP. */
      function loadByHttpUrl(url) {
        return $q(function(resolve, reject) {
          // Catch HTTP or generic errors not related to incorrect icon IDs.
          var announceAndReject = function(err) {
              var msg = angular.isString(err) ? err : (err.message || err.data || err.statusText);
              $log.warn(msg);
              reject(err);
            },
            extractSvg = function(response) {
              if (!svgCache[url]) {
                svgCache[url] = angular.element('<div>').append(response)[0].querySelector('svg');
              }
              resolve(svgCache[url]);
            };
  
          $templateRequest(url, true).then(extractSvg, announceAndReject);
        });
      }
  
      return dataUrlRegex.test(url)
        ? loadByDataUrl(url)
        : loadByHttpUrl(url);
    }
docs: Load the icon by URL (may use the $templateCache).
  Extract the data for later conversion to Icon
  @param {string} url icon URL
  @returns {angular.$q.Promise}