AngularJS directive to support NgModel for HTML input file types
npm install angularjs-file-modelAngularJS directive to support NgModel for HTML input file types
You can directly clone/download [here][angularjs-file-model]
``bash`
git clone https://github.com/sibiraj-s/angularjs-file-model.git
or use cdn
Minified:
`bash`
//unpkg.com/angularjs-file-model@latest/fileModel.min.js
Pretty Printed:
`bash`
//unpkg.com/angularjs-file-model@latest/fileModel.js
or
Install via Package managers such as [npm] or [yarn]
`bash`
npm install angularjs-file-model --saveor
yarn add angularjs-file-model
Import the modules required for angularjs-file-model.
`html`
add angularjsFileModel dependency to the module
`javascript`
angular.module('myApp', ['angularjsFileModel'])
and in your html
`html`
or
`html`
as-file` will bind the file object to the ng-model without it only plain object with file properties will bind to ng-model
[angularjs-file-model]: https://github.com/sibiraj-s/angularjs-file-model
[github]: https://sibiraj-s.github.io/
[npm]: https://www.npmjs.com/
[yarn]: https://yarnpkg.com/lang/en/