Skip to content

Releases: manudss/ngx-http-annotations

v0.8.0

20 Jul 15:31
7cb892e
Compare
Choose a tag to compare

-> Updates to Angular 16, and compile libs to ivy
-> change to nx workspace
-> Add unit tests

v0.8.0-beta.1

20 Jul 15:08
Compare
Choose a tag to compare
v0.8.0-beta.1 Pre-release
Pre-release

Make it works for angular 16, with compile with Ivy.

Use nx of this.
Add unit test for this.

v0.7.4-Beta.2 : migrate to nx workspace + update to angular 14

21 Oct 08:49
Compare
Choose a tag to compare

This is a technical release, to migrate to nx, and to angular 14.

Version 0.7.4-beta.1

26 Aug 08:22
Compare
Choose a tag to compare
Version 0.7.4-beta.1 Pre-release
Pre-release

V0.7.4 - Beta Pre-release
Fix error in last versin 0.7.3

Fix incorrect call for post / put /patch from 7.3.0

Bug introducted in last versions, when changing call from request to specific call method. But body must be given in an other parameters.

Version 0.7.3-beta.2 : Add delay (beta) + use specific httpClient method + update dependencies

20 Jun 21:35
Compare
Choose a tag to compare

Pre-release
Add delay : Add a beta feature, to add a delay to all request, or had a function that return this delay. This could be useful, in the mock feature. By default, all mock, will have a default delay. But could be also added without mock, to simulate long request.

Use all httpClient method rather than use request method, use corresponding method (get, put, delete ...). In order, to avoid issue with request method that throw a first empty error.

Update dependencies : Update to version 13 of Angular.

Version 0.7.0 RC

23 Mar 23:06
Compare
Choose a tag to compare
Version 0.7.0 RC Pre-release
Pre-release

-> Add a mock feature.

Mocks calls

To have a feature to enable mocks api. When enabled, will call directly the function rather than call the http request.

To enable Mocks : in a module provider use this :

providers: [{ provide: HTTP_ANNOTATIONS_USE_MOCKS, useValue: true }]

You can specify a boolean value, or have a specific function, that will be used to know if the apps will use mock. This could help you to define mock only for specific call.

providers: [{ provide: HTTP_ANNOTATIONS_USE_MOCKS, useValue: (url, requestType, params, args): boolean => {
       console.log('useMock : ', url, requestType, params, args);
      return requestType === 'Get' ? true : false;
    } }]

define your mocks by return a fake observable, with your mock data.

  @GET
  @Path('posts/:id')
  public getPost(@PathParam('id') id: number): Observable<any> {
    return of([{id: id, title: 'mock true'}]);
  }

Version 0.6.3

12 Feb 16:26
ec2da1b
Compare
Choose a tag to compare

update to build library with angular, to avoid error when build in --prod