I am analyzing some angular js source code of angular-file-upload
plugin and I have some problems trying to understand some code.
I know that export
is part of the new ES6 standards and it used to export functions and objects from a given file (or module).
But the following syntax is a bit weird me :
let {
copy,
extend,
forEach,
isObject,
isNumber,
isDefined,
isArray,
element
} = angular;
export default (fileUploaderOptions, $rootScope, $http, $window,
FileLikeObject, FileItem) => {
let {
File,
FormData
} = $window;
class FileUploader {
// class implemention....
}
return FileUploader;
}
What is the use of the =>
operator in this statement?