How to use the angular-in-memory-web-api.HttpClientInMemoryWebApiModule.forFeature function in angular-in-memory-web-api

To help you get started, we’ve selected a few angular-in-memory-web-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github graycoreio / daffodil / libs / state / src / cart / testing / cart-testing.module.ts View on Github external
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { HttpClientModule } from '@angular/common/http';
import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';
import { CartTestingService } from '../testing/services/cart.testing.service';
import { CartFactory } from '@daffodil/core';
import { CartService } from '../services/cart.service';
import { DaffodilConfigService } from '../../config/daffodil-config.service';

@NgModule({
  imports: [
    HttpClientModule,
    HttpClientInMemoryWebApiModule.forFeature(CartTestingService, {
      delay: 500
    })
  ],
  providers: [
    CartFactory,
    CartService,
    CartTestingService
  ]
})
export class CartTestingModule { }
github graycoreio / daffodil / libs / state / src / product / testing / product-testing.module.ts View on Github external
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';

import { ProductFactory } from '@daffodil/core';

import { ProductService } from '../services/product.service';
import { ProductTestingService } from '../testing/services/product.testing.service';

@NgModule({
  imports: [
    HttpClientModule,
    HttpClientInMemoryWebApiModule.forFeature(ProductTestingService, {
      delay: 500
    })
  ],
  providers: [
    ProductFactory,
    ProductService,
    ProductTestingService
  ]
})
export class ProductTestingModule { }