2

I use in-memory-web-api like this:

imports: [
    BrowserModule,
    HttpClientModule,
    AppRoutingModule,
    environment.production ?
      [] : HttpClientInMemoryWebApiModule.forRoot(InMemoryDataService, { delay: 100, passThruUnknownUrl: true }),
    // ...
  ],

However, now, I want to use HttpClientInMemoryWebApiModule in dev modde only for some APIs, because only some APIs need to be mocked and not yet have a "real" API to use.

I saw this very similar question, but passThruUnknownUrl does it did not work and I want to explicitly define, which URLs to fake and not to fake.

Also passThruUnknownUrl does not help, if you just want to use your server API and ignore one locally mocked API for a test, e.g.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.