1 | # angular2 in-memory-web-api
|
2 | An in-memory web api for Angular 2 demos and tests.
|
3 |
|
4 | See usage in the Angular.io
|
5 | [Server Communication](https://angular.io/docs/ts/latest/guide/server-communication.html) chapter.
|
6 |
|
7 | # Simple Query String Support
|
8 | Custom filters can be passed as a regex pattern via query string.
|
9 | The query string defines which property and value to match against.
|
10 |
|
11 | Format: `/app/heroes/?propertyName=regexPattern`
|
12 |
|
13 | In the following example we are matching on all names containing the letter 'j' in the heroes collection.
|
14 |
|
15 | `/app/heroes/?name=j+`
|
16 |
|
17 | # To Do
|
18 | * add documentation
|
19 | * add tests (shameful omission!)
|
20 |
|
21 | # Build Instructions
|
22 |
|
23 | Mostly gulp driven.
|
24 |
|
25 | The following describes steps for updating from one Angular version to the next
|
26 |
|
27 | >This is essential even when there are no changes of real consequence.
|
28 | Neglecting to synchronize Angular 2 versions
|
29 | triggers typescript definition duplication error messages when
|
30 | compiling your application project.
|
31 |
|
32 | - `gulp bump` - up the package version number
|
33 |
|
34 | - update `CHANGELOG.MD` to record the change
|
35 |
|
36 | - update the dependent version(s) in `package.json`
|
37 |
|
38 | - `npm install` the new package(s) (make sure they really do install!)<br>
|
39 | `npm list --depth=0`
|
40 |
|
41 | - consider updating typings, install individually/several:
|
42 | `npm run typings -- install packagename --ambient --save`
|
43 |
|
44 | **NB: Do not add to `npm postinstall` as that screws up consumers!**
|
45 |
|
46 | - `npm run typings install`
|
47 |
|
48 | - `npm run tsc` to confirm the project compiles w/o error (sanity check)
|
49 |
|
50 | -- NO TESTS YET ... BAD --
|
51 |
|
52 | - `gulp build`
|
53 | - commit and push
|
54 |
|
55 | - `npm publish`
|
56 |
|
57 | - Fix and validate angular.io docs samples
|
58 |
|
59 | - Add two tags to the release commit with for npmcdn
|
60 | - the version number
|
61 | - 'latest'
|