Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angularjs-file-model

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angularjs-file-model

AngularJS directive to support NgModel for HTML input file types

  • 1.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22
increased by120%
Maintainers
1
Weekly downloads
 
Created
Source

angularjs-file-model Tests

AngularJS directive to support NgModel for HTML input file types

Getting Started

Installation

You can directly clone/download here

git clone https://github.com/sibiraj-s/angularjs-file-model.git

or use cdn

Minified:

//unpkg.com/angularjs-file-model@latest/fileModel.min.js

Pretty Printed:

//unpkg.com/angularjs-file-model@latest/fileModel.js

or

Install via Package managers such as npm or yarn

npm install angularjs-file-model --save
# or
yarn add angularjs-file-model

Usage

Import the modules required for angularjs-file-model.

<script src="angular/angular.min.js"></script>
<script src="../fileModel.min.js"></script>

add angularjsFileModel dependency to the module

angular.module('myApp', ['angularjsFileModel'])

and in your html

<input type="file" ng-model="files" file-model ng-change="onFileSelect()">

or

<input type="file" ng-model="files" file-model as-file ng-change="onFileSelect()">

Option

as-file will bind the file object to the ng-model without it only plain object with file properties will bind to ng-model

Keywords

FAQs

Package last updated on 13 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc