angular-hypermedia icon indicating copy to clipboard operation
angular-hypermedia copied to clipboard

angular2?

Open kookster opened this issue 9 years ago • 6 comments

We also have HAL APIs, and use angular, but we're upgrading now to Angular2. Have you thought about, or done any work in that direction yet?

kookster avatar Mar 05 '16 13:03 kookster

Hi Andrew, I agree that angular-hypermedia should support Angular 2. However, I have not yet looked at it. Is this something you would consider working (together) on?

jcassee avatar Mar 07 '16 10:03 jcassee

Any updates on Angular 2? Are you still looking for help?

ravindranathakila avatar Jan 29 '17 17:01 ravindranathakila

I finally have a project that requires an Angular 2 hypermedia client. I think I am going to create a new project, though, as supporting Angular 1 and 2 at the same time looks difficult. @ravindranathakila have you looked into what would be needed?

jcassee avatar Feb 07 '17 14:02 jcassee

Sorry, I haven't. Exploring further, I was wondering if they really need to be coupled at all. I discovered Traversion which is gathering momentum. What are your thoughts?

https://github.com/basti1302/traverson/blob/master/readme.markdown

ravindranathakila avatar Feb 07 '17 14:02 ravindranathakila

I read up on Traversion before I started this project. Some features of this projects (i.e. why I did not just use Traversion):

  • An explicit context for caching resources.
  • An API that (in my opinion) better reflects the state-based nature of REST. I.e. you first instantiate a resource, and then decide to GET the state; you first follow a link and then decide to POST to it, etc. (Traversion always starts with getting a root resource, for example.)
  • Support for relations in properties, Link headers and HAL links.
  • A nice API for efficient loading "resource trees" ($loadPaths).
  • An extension for offline-first application. (This works, but was never fleshed out as well as this project.)

On the other hand, Traversion is much more widely used, so if it suits your needs, great!

jcassee avatar Feb 07 '17 14:02 jcassee

I haven't decided yet :)

You make some very good points!!

ravindranathakila avatar Feb 07 '17 15:02 ravindranathakila