0.0.1 • Published 8 years ago

angular2-http-node_backend v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

NodeBackend for Angular2

Now you can make ajax requests on node.

Setup

  1. Install the package

    $ npm install --save angular2-http-node_backend
  1. 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]})
    ])
        
  2. Profit