ngx-backend-mocker
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-ng11 • Public • Published

ngx-backend-mocker

This package helps to mock apis for angular components, per end-point and depending on the request.

To use the package, you will install it using npm, and add the NgBackendMockerModule, to your angular app. Then you will implement IBackendMockDataProvider which basically is just supposed to return an array of ResponseCheckPoint objects. Each ResponseCheckPoint by defines a response for a response.

By default, ResponseCheckPoint objects will respond to requests matching their uri and http method. but this can be customized and you can put your own logic to determine whether to respond or not to a request by assigning a (HttpRequest,ResponseCheckPoint) => boolean method to the requestSelector property of ResponseCheckPoint.

For more details and examples please checkout The github page

/ngx-backend-mocker/

    Package Sidebar

    Install

    npm i ngx-backend-mocker

    Weekly Downloads

    0

    Version

    1.0.0-ng11

    License

    none

    Unpacked Size

    64.5 kB

    Total Files

    21

    Last publish

    Collaborators

    • acidmanic
    • shn.eskandari