Code fix
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
bac3a4a30d
commit
ab822c6061
|
@ -17,8 +17,8 @@ core.run(vnInterceptor => {
|
||||||
vnInterceptor.setApiPath(null);
|
vnInterceptor.setApiPath(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
window.ngModule = function(moduleName, fn) {
|
window.ngModule = function(moduleName, ...args) {
|
||||||
return angular.mock.module(moduleName, function($provide, $translateProvider) {
|
let fns = [moduleName, function($provide, $translateProvider) {
|
||||||
// Avoid unexpected request warnings caused by angular translate
|
// Avoid unexpected request warnings caused by angular translate
|
||||||
// https://angular-translate.github.io/docs/#/guide/22_unit-testing-with-angular-translate
|
// https://angular-translate.github.io/docs/#/guide/22_unit-testing-with-angular-translate
|
||||||
$provide.factory('customLocaleLoader', function($q) {
|
$provide.factory('customLocaleLoader', function($q) {
|
||||||
|
@ -30,5 +30,10 @@ window.ngModule = function(moduleName, fn) {
|
||||||
});
|
});
|
||||||
|
|
||||||
$translateProvider.useLoader('customLocaleLoader');
|
$translateProvider.useLoader('customLocaleLoader');
|
||||||
}, fn);
|
}];
|
||||||
|
|
||||||
|
if (args.length)
|
||||||
|
fns = fns.concat(args);
|
||||||
|
|
||||||
|
return angular.mock.module(...fns);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue