angular-rest-adapter
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

angular-rest-adapter

$http adapter for easier connection to REST APIs

Build Status Coverage Status Dependency Status npm version

Intro

This module wraps angular's native $http, adding convenience methods for REST API requests

Installation

Install through bower:

    npm install angular-rest-adapter --save

Usage

  • Require the ngRestAdapter module in your angular application
    
    import "angular-rest-adapter";
    
    angular.module('app', ['ngRestAdapter']);
    
  • (Optionally) configure the service provider
    
    import {NgRestAdapterServiceProvider} from "angular-rest-adapter";
    
    angular.module('app', ['ngRestAdapter'])
    .config(['ngRestAdapterProvider', function(ngRestAdapterProvider:NgRestAdapterServiceProvider){
        ngRestAdapterProvider
            .configure({
                baseUrl: 'http://api.example.com/path/to/api/root'
            })
        ;
    }]);
    
  • ???
  • Profit!

Readme

Keywords

none

Package Sidebar

Install

npm i angular-rest-adapter

Weekly Downloads

1

Version

2.0.1

License

MIT

Last publish

Collaborators

  • iqs-owner
  • xiphiaz