mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Fix
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class FileLoaderService {
|
||||
|
||||
constructor() { }
|
||||
|
||||
|
||||
loadeFile({ type = 'file'}): HTMLInputElement {
|
||||
|
||||
let input = document.createElement('input');
|
||||
input.type = type;
|
||||
|
||||
// input.onchange = () => {
|
||||
// // you can use this method to get file and perform respective operations
|
||||
// let files = Array.from(input.files);
|
||||
// console.log(files);
|
||||
// };
|
||||
|
||||
input.click();
|
||||
|
||||
return input
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user