angular2-http-node_backend
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

NodeBackend for Angular2

Now you can make ajax requests on node.

Setup

  1. Install the package

     $ npm install --save angular2-http-node_backend
    
  2. Provide a custom Http instance which uses NodeBackend

     import { NodeBackend } from 'angular2-http-node_backend';
     
     bootstrap(App, [
       HTTP_PROVIDERS,
       provide(NodeBackend, { useFactory: (respOpt) => new NodeBackend(respOpt), deps: [ResponseOptions]}),
       provide(Http, {useFactory: (backend, options) => {
         return new Http(backend, options);
       }, deps: [NodeBackend, RequestOptions]})
     ])
    
  3. Profit

Package Sidebar

Install

npm i angular2-http-node_backend

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • theblacksmith