https://angular.io/docs/ts/latest/guide/server-communication.html#!#in-mem-web-api
Angular’s http
service delegates the client/server communication tasks to a helper service called the XHRBackend
.
Using standard Angular provider registration techniques, the InMemoryWebApiModule
replaces the default XHRBackend
service with its own in-memory alternative. The forRoot
method initialize the in-memory web API with seed data from the mock hero dataset at the same time.
Advertisements