npm.io
0.1.0 • Published 10 years ago

theon-angular-adapter

Licence
MIT
Version
0.1.0
Deps
0
Vulns
0
Weekly
0
Stars
2

theon-angular-adapter Build Status

AngularJS $http agent adapter for theon based API clients

It works with Angular +1.0.

Installation

Via npm

npm install theon-angular-adapter

Via Bower

bower install theon-angular-adapter

Or loading the script remotely

<script src="//cdn.rawgit.com/theonjs/theon-angular-adapter/master/angular-adapter.js"></script>

Environments

  • Chrome >= 5
  • Firefox >= 3
  • Safari >= 5
  • Opera >= 10
  • IE >= 9
Setup

Load the module as dependency of your application

var app = angular.module('app', ['theon.adapter'])
Services
$resilient

Main service to creating new Resilient HTTP clients

app.config(function ($theonAdapter) {
  // Configure theon to use the agent adapter
  theon.agents.set($theonAdapter)
})

API

theon API documentation.

$theonAdapter(req, res, done)

theon HTTP agent adapter.

Development

Only node.js is required for development

Clone the repository

$ git clone https://github.com/theonjs/theon-angular-adapter.git && cd theon-angular-adapter

Install dependencies

$ npm install
$ bower install

Generate browser bundle source

$ make browser

Run tests

$ make test

License

MIT Tomas Aparicio

Keywords