ng-imgur
Take your favourite cat picture, and upload it to Imgur.com w/ Angular!
Last updated 5 years ago by wildhoney .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ng-imgur 
SYNC missed versions from official npm registry.

ngImgur

Travis   npm

Getting Started

With ngImgur you can easily add a component on your website to facilitate the uploading of wonderful cat pictures to Imgur.com r/cats. Meow!

Understand Me

Add the ngImgur module as a dependency to your application:

$angular.module('myApp', ['ngImgur']);

And then import the service into any of your controllers, services, or directives:

myApp.controller('CatController', function(imgur) {
    // ...
});

Then with your image (see FileReader) invoke the imgur.upload method:

imgur.upload(file).then(function then(model) {
    console.log('Your adorable cat be here: ' + model.link);
});

Using the upload method you can also upload an array of images – everything remains the same except the argument passed into then which would be a collection of the models.

imgur.upload([firstFile, secondFile, thirdFile]).then(function then(collection) {
    console.log('You uploaded ' + collection.length + ' balls of fur!');
});

Tests

All of the ngImgur tests can be run using Karma with the easiest method being the grunt test command after you've installed all Bower dependencies with bower install.

Current Tags

  • 0.2.1                                ...           latest (5 years ago)

8 Versions

  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.5                                ...           5 years ago
  • 0.1.4                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |