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

v4.1.0

Compare
Choose a tag to compare
@mdvorak mdvorak released this 13 Feb 14:07
· 251 commits to master since this release

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