This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
v4.1.0
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, useActivatedView
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.