Commit e448e8cd authored by bingchuan's avatar bingchuan

[dev]2.18.4

parent 5c88f0d3
/*! /*!
* angular-translate - v2.13.1 - 2016-12-06 1 * angular-translate - v2.18.4 - 2021-01-14
* *
* Copyright (c) 2016 The angular-translate team, Pascal Precht; Licensed MIT * Copyright (c) 2021 The angular-translate team, Pascal Precht; Licensed MIT
*/ */
(function (root, factory) { (function (root, factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
define([], function () { define([], function () {
return (factory()); return (factory());
}); });
} else if (typeof exports === 'object') { } else if (typeof module === 'object' && module.exports) {
// Node. Does not work with strict CommonJS, but // Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports, // only CommonJS-like environments that support module.exports,
// like Node. // like Node.
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
} }
}(this, function () { }(this, function () {
$translateStaticFilesLoader.$inject = ['$q', '$http']; $translateStaticFilesLoader.$inject = ['$q', '$http'];
angular.module('pascalprecht.translate') angular.module('pascalprecht.translate')
/** /**
* @ngdoc object * @ngdoc object
* @name pascalprecht.translate.$translateStaticFilesLoader * @name pascalprecht.translate.$translateStaticFilesLoader
* @requires $q * @requires $q
...@@ -34,9 +34,9 @@ angular.module('pascalprecht.translate') ...@@ -34,9 +34,9 @@ angular.module('pascalprecht.translate')
* *
* @param {object} options Options object, which gets prefix, suffix, key, and fileMap * @param {object} options Options object, which gets prefix, suffix, key, and fileMap
*/ */
.factory('$translateStaticFilesLoader', $translateStaticFilesLoader); .factory('$translateStaticFilesLoader', $translateStaticFilesLoader);
function $translateStaticFilesLoader($q, $http) { function $translateStaticFilesLoader($q, $http) {
'use strict'; 'use strict';
...@@ -45,6 +45,7 @@ function $translateStaticFilesLoader($q, $http) { ...@@ -45,6 +45,7 @@ function $translateStaticFilesLoader($q, $http) {
if (!options || (!angular.isArray(options.files) && (!angular.isString(options.prefix) || !angular.isString(options.suffix)))) { if (!options || (!angular.isArray(options.files) && (!angular.isString(options.prefix) || !angular.isString(options.suffix)))) {
throw new Error('Couldn\'t load static files, no files and prefix or suffix specified!'); throw new Error('Couldn\'t load static files, no files and prefix or suffix specified!');
} }
if (!options.files) { if (!options.files) {
options.files = [{ options.files = [{
prefix: options.prefix, prefix: options.prefix,
...@@ -69,8 +70,7 @@ function $translateStaticFilesLoader($q, $http) { ...@@ -69,8 +70,7 @@ function $translateStaticFilesLoader($q, $http) {
return $http(angular.extend({ return $http(angular.extend({
url: fileUrl, url: fileUrl,
method: 'GET', method: 'GET'
params: ''
}, options.$http)) }, options.$http))
.then(function(result) { .then(function(result) {
return result.data; return result.data;
...@@ -104,9 +104,9 @@ function $translateStaticFilesLoader($q, $http) { ...@@ -104,9 +104,9 @@ function $translateStaticFilesLoader($q, $http) {
return mergedData; return mergedData;
}); });
}; };
} }
$translateStaticFilesLoader.displayName = '$translateStaticFilesLoader'; $translateStaticFilesLoader.displayName = '$translateStaticFilesLoader';
return 'pascalprecht.translate'; return 'pascalprecht.translate';
})); }));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment