You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,25 +6,18 @@ that emulates CRUD operations over a RESTy API.
6
6
7
7
It intercepts Angular `Http` and `HttpClient` requests that would otherwise go to the remote server and redirects them to an in-memory data store that you control.
8
8
9
-
---
9
+
See [Austin McDaniel's article](https://medium.com/@amcdnl/mocking-with-angular-more-than-just-unit-testing-cbb7908c9fcc)
10
+
for a quick introduction.
10
11
11
-
##Important recent changes
12
+
### _It used to work and now it doesn't :-(_
12
13
13
-
### HTTP response data no longer wrapped in object w/ `data` property
14
+
Perhaps you installed a new version of this library? Check the
for breaking changes that may have affected your app.
14
17
15
-
As of v0.5.0 (5 October 2017), the `dataEncapsulation` configuration default changed from `true` to `false`. The HTTP response body holds the data values directly rather than an object that encapsulates those values, `{data: ...}`. This is a **breaking change that affects almost all existing apps!**
16
-
17
-
See the [CHANGELOG](https://github.com/angular/in-memory-web-api/blob/master/CHANGELOG.md/#0.5.0) for the reason behind this change and how to quickly fix your code or revert to encapsulation.
18
-
19
-
### v0.4 supports `HttpClient`
20
-
Release v0.4.0 (8 Sept 2017) was a major overhaul of this library.
21
-
22
-
The v0.4.0 release introduced **breaking changes** that affect developers who used the customization features or loaded application files with SystemJS.
23
-
24
-
**Read this README and the [CHANGELOG](https://github.com/angular/in-memory-web-api/blob/master/CHANGELOG.md/#0.4.0)**
25
-
to learn what's new and about other **breaking changes**.
26
-
27
-
---
18
+
If that doesn't explain it, create an
19
+
[issue on github](https://github.com/angular/in-memory-web-api/issues),
20
+
preferably with a small repro.
28
21
29
22
## Use cases
30
23
@@ -148,6 +141,17 @@ to ensure that the in-memory backend provider supersedes the Angular version.
148
141
149
142
* You can setup the in-memory web api within a lazy loaded feature module by calling the `.forFeature` method as you would `.forRoot`.
150
143
144
+
* In production, you want HTTP requests to go to the real server and probably have no need for the _in-memory_ provider.
145
+
CLI-based apps can exclude the provider in production builds like this:
0 commit comments