code: function bootstrap(options) {
              var deferred = $q.defer();
  
              // Default options object to empty hash
              var opts = options || {};
  
              // Don't reload API if it is already loaded
              if (isLoaded()) {
                  deferred.reject('ArcGIS API for JavaScript is already loaded.');
                  return deferred.promise;
              }
  
              // Create Script Object to be loaded
              var script    = document.createElement('script');
              script.type   = 'text/javascript';
              script.src    = opts.url || window.location.protocol + '//js.arcgis.com/4.8';
  
              // Set onload callback to resolve promise
              script.onload = function() { deferred.resolve( window.require ); };
  
              document.body.appendChild(script);
  
              return deferred.promise;
          }
docs: @ngdoc function
  @name bootstrap
  @methodOf esri.core.factory:esriLoader
  
  @description
  Loads the ArcGIS API for JavaScript.
  
  @param {Object=} options Send a list of options of how to load the ArcGIS API for JavaScript.
  This defaults to `{url: 'https://js.arcgis.com/4.8'}`.
  
  @return {Promise} Returns a $q style promise which is resolved once the ArcGIS API for JavaScript has been loaded.