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

@spirex/di-angular-bridge

v1.0.0

Published

Allows using SpireX/DI as a domain-level service container while accessing services via standard Angular DI API.

Readme

NPM Type Definitions NPM Version Codecov GitHub License

SpireX/DI Bridge for Angular

@spirex/di-angular-bridge

Seamless integration bridge between SpireX/DI and Angular Dependency Injection (DI).

This library allows developers to leverage Angular’s DI API while maintaining type-safe injections from SpireX/DI. Perfect for projects that want the best of both DI systems without losing strict typing.

Why Use Bridge?

If you are using SpireX/DI in your application and want to integrate it with Angular’s DI ecosystem, this bridge simplifies the process. Key benefits include:

  • Type-safe Angular injections: Use SpireX/DI services directly in Angular components and services while preserving full TypeScript types.
  • Automatic provider generation: Generates Angular providers from your SpireX/DI container effortlessly.
  • Flexible integration: Supports both the new inject() function and traditional constructor injection with @Inject.
  • Lightweight: Focused on bridging DI systems without adding unnecessary overhead. Only ~1.3Kb (0.66Kb gzip).

Installation

npm install @spirex/di @spirex/di-angular-bridge
# or
yarn add @spirex/di @spirex/di-angular-bridge

Quick Start

1. Configure SpireX/DI with Angular Bridge

import { diBuilder, factoryOf } from '@spirex/di';
import { AngularBridge } from '@spirex/di-angular-bridge';
import { IAuthService, AuthService } from './services/auth';

// Build DI container and attach AngularBridge
export const container = diBuilder<{
    auth: IAuthService; 
}>()
    .bindFactory('auth', factoryOf(AuthService))
    .use(AngularBridge())
    .build();

2. Access the Bridge and Tokens

// Retrieve the configured Angular bridge
export const bridge = container.get('AngularBridge');

// InjectionToken-s can be used with Angular DI
export const TOKENS = bridge.tokens;

3. Register Providers in Angular

import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';

bootstrapApplication(AppComponent, {
    providers: [
        ...bridge.providersForRoot(),
    ]
});

4. Inject Dependencies in Components

Using inject() function:

import { Component, inject } from '@angular/core';

@Component({ ... })
export class MyComponent {
    private auth = inject(TOKENS.auth); // IAuthService
}

Using constructor injection with @Inject:

import { Component, Inject } from '@angular/core';

@Component({ ... })
export class MyComponent {
    constructor(
        @Inject(TOKENS.auth) private auth: IAuthService,
    ) {}
}

Documentation


License

@spirex/di-angular-bridge is released under the MIT License.

You are free to use, modify, and distribute the library in both personal and commercial projects.