angular.module('opendap-viewer')
  .factory('jqdap', ($window, $q) => {
    return {
      loadDataset: (url, options) => {
        return $q.when($window.jqdap.loadDataset(url, options));
      },
      loadData: (url, options) => {
        return $q.when($window.jqdap.loadData(url, options));
      }
    };
  });

angular.module('opendap-viewer')
  .factory('jqdap', ($window, $q) => {
    return {
      loadDataset: (url, options) => {
        options.withCredentials = true;
        return $q.when($window.jqdap.loadDataset(url, options));
      },
      loadData: (url, options) => {
        options.withCredentials = true;
        return $q.when($window.jqdap.loadData(url, options));
      }
    };
  });

Allow basic auth with browser dialog
Allow basic auth with browser dialog
