angular / in-memory-web-api

The code for this project has moved to the angular/angular repo. This repo is now archived.
MIT License
1.18k stars 230 forks source link

error: "Collection 'heroes' not found" #238

Closed HADDADENICAR closed 5 years ago

HADDADENICAR commented 5 years ago

I follow Angular'Http tutorial. I have installed the 0.8.0 version of angular-in-memory-web-api,generated the service and added all the imports in app.module.

when i refresh the browser i got this error:

 [WDS] Disconnected! client:177
 Angular is running in the development mode. Call enableProdMode() to enable the production              mode. core.js:16829
   ERROR 
    {…}
body: Object { error: "Collection 'heroes' not found" }
headers: Object { normalizedNames: Map(0), lazyUpdate: null, lazyInit: lazyInit() }
status: 404
statusText: "Not Found"
url: "api/heroes"
HADDADENICAR commented 5 years ago

SOLVED ,instead of return{heroes} , i put return(heroes) and that triggered the issue .