Skip to content

theonjs/angular-adapter

Repository files navigation

theon-angular-adapter Build Status

AngularJS $http agent adapter for theon based API clients

Works with AngularJS +1.0 and theon +0.1.

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/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

About

AngularJS HTTP agent adapter for theon

Resources

License

Stars

Watchers

Forks

Packages

No packages published