File Input

NgAceFile is a wrapper for Ace's file input element.

Inputs

NgAceFile:

The same options as Ace's file input options can be used.

Outputs

onChanged

Emitted when new files get selected

onInvalidError

Emitted when invalid files have been selected

onPreviewError

Emitted when previewing an image file is not successful

onClear

Emitted when clear (reset) button is clicked and file input is cleared

html
<input type="file" [NgAceFile]='{"droppable": true, "maxSize": 10000}' #file="NgAceFile" />
ts
@ViewChild ('file') file: NgAceFile;

someMethod() {
    file.onChanged.subscribe(($event) => {
        let files = $event;
        // or
        // let files = file.files()
        // let method = file.method()        
    })

    file.onInvalidError.subscribe(($event) => {
        let errors = $event;
    })

    file.startLoading()
    file.stopLoading()
}


Methods

Similar to Ace's Js plugin.

files

method

showFileList

reset

enableReset

disbleReset

enable

disable

startLoading

stopLoading