npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@axonsdev/hateoas-angular

v0.1.0

Published

Angular integration for `@axonsdev/hateoas-core`.

Readme

@axonsdev/hateoas-angular

Angular integration for @axonsdev/hateoas-core.

This package provides Angular dependency injection helpers and a small signal-based resource store. It does not contain domain-specific UI components.

Responsibilities

  • Register a configured HATEOAS client in Angular DI.
  • Provide the HATEOAS_CLIENT injection token.
  • Provide HypermediaResourceStore for common resource loading state.
  • Default to fetch transport and Siren parsing while allowing parser overrides.

Main Exports

HATEOAS_CLIENT
provideHateoasClient(options)
HypermediaResourceStore
HypermediaResourceState
ProvideHateoasClientOptions

Registering The Client

import { ApplicationConfig } from '@angular/core';
import { provideHateoasClient } from '@axonsdev/hateoas-angular';

export const appConfig: ApplicationConfig = {
  providers: [
    provideHateoasClient({
      baseUrl: 'http://localhost:3000',
      headers: () => ({
        Authorization: `Bearer ${token()}`,
      }),
    }),
  ],
};

By default, provideHateoasClient creates:

createHateoasClient({
  transport: fetchTransport(options),
  parsers: [sirenParser()]
})

Injecting The Client

import { inject } from '@angular/core';
import { HATEOAS_CLIENT } from '@axonsdev/hateoas-angular';

const client = inject(HATEOAS_CLIENT);
const resource = await client.get('/api/cases/CASE-001');

Custom Parsers

provideHateoasClient({
  baseUrl: 'http://localhost:3000',
  parsers: [customParser],
});

Use this when the API supports another hypermedia format or when Siren parsing needs to be replaced.

Resource Store

HypermediaResourceStore<TProperties> is a small signal-based store for screens that load one resource.

It tracks:

resource
loading
error
actionRunning

Example:

@Injectable()
export class CaseDetailStore extends HypermediaResourceStore<CaseProperties> {}

In a business service:

this.store.setLoading(true);

try {
  const resource = await this.client.get<CaseProperties>(href);
  this.store.setResource(resource);
} catch (error) {
  this.store.setError(error instanceof Error ? error.message : 'Unknown error');
} finally {
  this.store.setLoading(false);
}

Recommended Layering

Use Angular components for rendering and event binding.

Use feature business services for orchestration:

  • call the HATEOAS client;
  • submit actions;
  • follow links;
  • update stores.

Use stores for view state.

This keeps components from hardcoding business rules or API routes.

Notes

  • The package does not include UI components.
  • The package does not own routing.
  • The package does not impose NgRx or any external state library.
  • The default transport is fetch-based through @axonsdev/hateoas-fetch.