Questions tagged [angular-in-memory-web-api]
51 questions
12
votes
3 answers
Angular tutorial, InMemoryWebApiModule throwing 500 internal server error with angular-in-memory-web-api 0.6.0
InMemoryWebApiModule is working with downloaded source code where
"angular-in-memory-web-api": "~0.5.0" But not with"angular-in-memory-web-api": "^0.6.0"
I have followed the tutorial,to install angular-in-memory-web-api :
npm install…

Drisal
- 123
- 1
- 7
4
votes
2 answers
Trying to npm install angular-in-memory-web-api and I'm getting errors
npm i angular-in-memory-web-api --save-dev
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ng-naruto-app@0.0.0
npm ERR! Found: @angular/common@13.3.11
npm ERR!…

Sylvain Tagnabou
- 53
- 6
3
votes
1 answer
Anyone try using InMemoryWebAPI with standalone components?
I am using Angular v16 with standalone components. I implemented InMemoryWebAPI as I have in NgModule-based projects, but it doesn't seem to be working. I keep getting 404 not found.
Anyone try this and have success with InMemoryWebAPI with…

DeborahK
- 57,520
- 12
- 104
- 129
3
votes
0 answers
Angular In Memory Web API - How to change priority to HTTP Local server then In memory web API
I am working with Angular In Memory Web API for making API calls locally without actual RESTful APIs from my Java application. I created the URLs in In memory Data service as same like LIVE RESTful API URLs.
export class UserMockService {
…

J Query
- 305
- 4
- 19
3
votes
1 answer
angular in-memory-web-api simple query string not working with @ character
I am using Angular2+ with in-memory-web-api and I am trying to do a simple query string. I am passing an exact email address to check if the user already exists. My createDB has a couple users with a propertyName of 'loginEmail' and these…

stupidFace
- 181
- 1
- 8
3
votes
1 answer
angular how to use in-memory-web-api only for demo account
I have found a lot of resources on how to switch between using angular-in-memory-web-api or real API depending on the environment (dev or prod) but what I'm trying to do is quite different.
I want people to be able to try out the product without…

user3803848
- 179
- 1
- 13
3
votes
5 answers
Angular" http-in-memory-web-api" can't find module '@angular/http' error
Upon compilation, I got this error:
ERROR in node_modules/angular-in-memory-web-api/http-backend.service.d.ts(2,75): error TS2307: Cannot find module '@angular/http'.
…

Alexz
- 741
- 1
- 8
- 20
2
votes
1 answer
Angular-in-memory-web-api PUT returns null
I created this basic data service for todos:
import { InMemoryDbService } from 'angular-in-memory-web-api';
import { Todo } from './todos.service';
export class TodosData implements InMemoryDbService {
createDb() {
const todos: Todo[] = [
…

spierala
- 2,349
- 3
- 25
- 50
2
votes
1 answer
genId() method in "Angular-in-memory-web-api"
I'm doing the Angular Tour of heroes tutorial, but there is somethings I don't understand, I did some google reasearch but I don't find out an explanation. I don't know where I could ask question. So, sorry if I am in the wrong place...
So, there :…

Eric
- 43
- 5
2
votes
0 answers
How to use angular-in-memory-web-api only for some APIs?
I use in-memory-web-api like this:
imports: [
BrowserModule,
HttpClientModule,
AppRoutingModule,
environment.production ?
[] : HttpClientInMemoryWebApiModule.forRoot(InMemoryDataService, { delay: 100, passThruUnknownUrl: true…

rugk
- 4,755
- 2
- 28
- 55
2
votes
1 answer
Error when adding query params to http request
I am using mock data and InMemoryDbService as shown on the tour of heroes example. Loading data works fine when I don't pass HttpParams. Once I add params, I get a 500 response with the following error in the body: {error: "collection.filter is not…

user1738539
- 874
- 2
- 11
- 23
2
votes
2 answers
Is it possible to pass in more than one ID to a query string in angular-in-memory-web-api?
For example, I want do something like this:
{hostURL}/api/entities/14/15/16/17
which in turn would bring back all the data for the corresponding IDs. This approach doesn't work. I also tried this, which didn't work…

James Barrett
- 2,757
- 4
- 25
- 35
2
votes
1 answer
Can't get angular-in-memory-web-api 0.6.1 to work following the tutorial
So I've followed the tutorial from https://angular.io/tutorial/toh-pt6 . I've tailored the tutorial to my specific case, which is just displaying a dashboard. When I use a local mock my code works perfectly fine. It's when I upgrade to the in memory…

James D
- 1,975
- 2
- 17
- 26
2
votes
1 answer
Nested in-memory-web-api i.e. longer uri
I'm trying to develop an application using in-memory-web-api, however, I'm not sure how to deal with longer URI patterns.
For example, I need to fetch some configuration data from the server using /api/v1/configuration/manager and…

Gitnik
- 564
- 7
- 26
2
votes
1 answer
angular-in-memory-web-api internal server error
I have reached the latest step in Angular's Tour-of-Heroes tutorial. After using the angular-in-memory-web-api, no data has appeared on my screen. There is no compilation error, but in the browser's console i get this:
Everything is exactly the…

YTScorpion
- 31
- 1
- 4