Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Releases: mdvorak/resource-router

v10.0.0

24 Jan 07:39
9d2713e
Compare
Choose a tag to compare

Updated to Angular 13.x.

v9.3.0

07 Dec 06:10
e6c5016
Compare
Choose a tag to compare
  • Added loadChildren to ViewDef.
  • Support lazy loading.

v9.2.0

18 Nov 11:11
Compare
Choose a tag to compare
  • Added resolve to ViewData.
  • Added resolve: Observable<ResolveData> to ActivatedView class, which is same as view.data.subscribe(data => ... = data.resolve.#resolverName);.
  • Added [resourceLinkActive] combine with [resourceLink] support directive that can add classes to active elements in the navigation menu

v7.0.0

25 Feb 21:00
Compare
Choose a tag to compare

Updated to Angular 7.x. Thanks Zakir for PR.

v5.0.1

16 Feb 09:04
Compare
Choose a tag to compare

Adapted original Tour of Heroes Angular example to use this router. It is missing some features, but
take a look at Live Demo.

Features

  • Added body: Observable<T> to ActivatedView<T> class, which is same as view.data.subscribe(data => ... = data.body);
  • SingleApiMapper now supports host-relative urls (/api/foobar)
  • Example app is now adapted Tour of Heroes from Angular. Uses mock in-memory API.
  • #31 npm run buildapp now requires library to be built in dist folder, and tests whether it is AOT compilable

Bug Fixes

  • Fixed several Observable operator imports

v5.0.0

15 Feb 12:40
Compare
Choose a tag to compare

Features

  • Version for Angular 5.x, otherwise almost identical with 4.1.1.
  • Improved DefaultErrorComponent, now it renders html as content instead of code
  • Docs no longer contain internal components
  • Internally improved config, tests now no longer needs library to be built

v4.1.1

14 Feb 10:03
Compare
Choose a tag to compare

Resolved Issues

  • #26 When HttpResourceClient request fails, error is swallowed
  • #28 v4.1.0 is broken in production mode

Known Problems

  • As result of #26, error value might be now consumed in some cases.
    Created #27 to address the issue.

v4.1.0

13 Feb 14:07
Compare
Choose a tag to compare

This is breaking release, despite it breaks semantic versioning. Its for Angular v4.x applications to allow migration to new model and Angular v5.x

Changed data used in components to reactive pattern, which allows reuse of created view components.

Breaking Changes

  • ViewData is no longer available for injection, use ActivatedView instead:

    @Component(...)
    export class SampleComponent implements OnInit {
    
      public data: MyData;
    
      constructor(public view: ActivatedView<MyData>) {
      }
    
      ngOnInit(): void {
        this.view.data.subscribe(data => this.data = data.body);
      }
    }
  • ResourceData directive now needs to be accompanied by [resourceContext] directive:

    <div *resourceData="let data of apiLocation" [resourceContext]="data">...</div>

    Otherwise navigation (resourceLinks) won't work.

    Note that navigation internals might change in future releases.

  • Many internal components were changed or moved. See https://github.com/mdvorak/resource-router/pull/24/commits for whole changelog

Features

  • Added Link interface that describes HAL link.
  • Added ResourceData class that can be used to programmatically load and navigate resource.
  • Added [resourceContext] support directive which can provides navigation context for nested components.
  • Added debugLog that is used when angular does not run in developer mode. This feature will be extended in the future.

Resolved Issues

  • #6 Change ApiLocation and NavigationHandler to reactive pattern
  • #7 resource-data directive should provide loading property
  • #9 Change ViewData to reactive pattern
  • #21 Replace *resource-data directive with simple class
  • #23 Broken travis build

v4.0.0

30 Dec 18:04
Compare
Choose a tag to compare

Bumping to 4.x, to match Angular version.
Moved from gulp custom build script to ng-packagr.

Breaking Changes

  • Upgraded to use HttpClient instead of deprecated Http
  • Renamed route config key body to responseType
  • responseType now supports only json and text values - blob was buggy in old implementation
    and its use would be very rare
  • Refactored ApiMapper component - there is now ApiUrl and ApiMapper abstract classes,
    with default implementations.
  • Typescript 2.3 (newer is not supported by Angular 4.x)

Bug Fixes

  • [resourceLink] should now properly handle external URLs (those that cannot be mapped to an API endpoint)
  • Various fixes with API prefixes and URL handling in general