Initial commit
This commit is contained in:
32
api-wiaas/client/js/app.js
Normal file
32
api-wiaas/client/js/app.js
Normal file
@@ -0,0 +1,32 @@
|
||||
var global = {
|
||||
dashModule: angular.module('dashApp', ['pascalprecht.translate', 'ui-notification', 'ngDragDrop', 'ngFileUpload', 'ui.sortable', 'ui.tinymce', 'ngclipboard']),
|
||||
PATH_JS_COMPONENTS: 'client/js/components/',
|
||||
getParameterByName: function (name) {
|
||||
const url = window.location.href;
|
||||
const parsedName = name.replace(/[\[\]]/g, '\\$&');
|
||||
var regex = new RegExp('[?&]' + parsedName + '(=([^&#]*)|&|#|$)'),
|
||||
results = regex.exec(url);
|
||||
|
||||
if (!results) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!results[2]) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
}
|
||||
};
|
||||
|
||||
global.dashModule.factory('$', [
|
||||
'$window',
|
||||
($window) => {
|
||||
return $window.jQuery;
|
||||
}
|
||||
]);
|
||||
|
||||
global.dashModule.config(function ($httpProvider) {
|
||||
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
|
||||
$httpProvider.defaults.paramSerializer = '$httpParamSerializerJQLike';
|
||||
});
|
||||
Reference in New Issue
Block a user