Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
angular-translate-loader-static-files
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Custom Issue Tracker
Custom Issue Tracker
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angularjs
angular-translate-loader-static-files
Commits
e448e8cd
Commit
e448e8cd
authored
Mar 21, 2021
by
bingchuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev]2.18.4
parent
5c88f0d3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
82 deletions
+82
-82
translate-loader-static-files.js
translate-loader-static-files.js
+82
-82
No files found.
translate-loader-static-files.js
View file @
e448e8cd
/*!
/*!
* angular-translate - v2.1
3.1 - 2016-12-06 1
* angular-translate - v2.1
8.4 - 2021-01-14
*
*
* Copyright (c) 20
16
The angular-translate team, Pascal Precht; Licensed MIT
* Copyright (c) 20
21
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'
;
}));
}));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment