I was thinking about directives the other day and how useful they are in AngularJS. They encourage us to create reusable components and widgets that can be shared across projects. If you've used jQuery plugins, you understand the value of good well-built reusable components.
Today I want to share a great little directive, ng-file-upload. It's a light-weight directive for handling file uploads which are common in forms that handle image or document uploads (such as forms for creating a profile on a site, or filling out legal documents, or submitting class assignments for school).
What I like is that it's very very simple to use and there are multiple examples of server-side/backend code for handling file uploads provided.
Here's an example of using ng-file-upload to show an image after it has been uploaded:
Check it out on Github: https://github.com/danialfarid/ng-file-upload