I am in the process of developing a file upload feature for my application. Once the files are successfully uploaded, I want to clear the list of uploaded files. To achieve this, I have created the following function in the file uploader component:
clearFileList(){
this.uploadedFiles=[]
}
Now, I would like to invoke this function from a service so that I can reuse it in other components. How can I accomplish this?