4.1.1 (2018-02-14)
- #26 When HttpResourceClient request fails, error is swallowed
- #27 v4.1.0 is broken in production mode
- As result of #26, error value might be now consumed in some cases. Created #27 to address the issue.
4.1.0 (2018-02-12)
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.
-
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"> <resource-view [data]="data"></resource-view> </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
- 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.
- #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
4.0.0 (2017-12-30)
Bumping to 4.x, to match Angular version. Moved from gulp custom build script to ng-packagr.
- Upgraded to use HttpClient instead of deprecated
Http
- Renamed route config key
body
toresponseType
responseType
now supports onlyjson
andtext
values -blob
was buggy in old implementation and its use would be very rare- Refactored
ApiMapper
component - there is nowApiUrl
andApiMapper
abstract classes, with default implementations. - Typescript 2.3 (newer is not supported by Angular 4.x)
- #17
[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
1.0.0-alpha.12 (2017-04-22)
Now compiled with strictNullChecks: true
typescript option, which leads to explicit
optional function arguments.
- Final UMD bundle now contains source maps
- Example is now built with @angular/cli
- Moved to Angular 4.0.0
- Moved to Typescript 2.1+
- Deprecated
apiLink
directive in favour of newresourceLink
(which conforms to Angular naming convention) - Renamed
ApiUrl
class toApiMapper
(relates to #13)
- Compiled with strictNullChecks
resourceLink
is new directive, which fixes navigation problems, page reloads, and works both on<a>
(with more features) and other tags like<button>
(closes #15)