Class: component_ directive:ngeoFilereader

ngeo.misc.module:filereaderComponent.component_

new component_($window)

This directive is to used on an input file element. When a file is selected the directive uses the browser FileReader API to read the file. The file content is provided to the directive user through the assignable expression. Only works for text files (readAsText used for reading the file). And does not work in Internet Explorer 9.

Example:

 <input type="file" ngeo-filereader="ctrl.fileContent"
   ngeo-filereader-supported="ctrl.supported"/>

See our live example: ../examples/importfeatures.html

HTML attributes:
Name Type Attributes Description
ngeo-filereader string The content of the file read.
ngeo-filereader-supported boolean <optional>
Whether the FileReader API is supported.
Returns:
angular.Directive

Directive Definition Object.