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

@arlioz/flagship-angular-legacy

v5.0.0

Published

Official Angular SDK for FlagShip — legacy support for Angular 10-15

Readme

@arlioz/flagship-angular-legacy

Official Angular SDK for FlagShip — legacy support for Angular 10 to 15.

For Angular 16+, use @arlioz/flagship-angular which includes Signal support, standalone components, and functional guards.

Installation

npm install @arlioz/flagship @arlioz/flagship-angular-legacy

Setup

// app.module.ts
import { FlagShipModule } from '@arlioz/flagship-angular-legacy'

@NgModule({
  imports: [
    FlagShipModule.forRoot({
      apiKey: 'flg_production_...',
      baseUrl: 'https://api.flagship.dev/api',
    }),
  ],
})
export class AppModule {}

Usage

RxJS API

import { Component } from '@angular/core'
import { FlagShipService } from '@arlioz/flagship-angular-legacy'

@Component({
  selector: 'app-feature',
  template: `
    <div *ngIf="darkMode$ | async">Dark mode is enabled!</div>
    <p>Welcome: {{ welcomeMsg$ | async }}</p>
  `,
})
export class FeatureComponent {
  constructor(private flagship: FlagShipService) {}

  darkMode$ = this.flagship.getFlag('dark-mode', false)
  welcomeMsg$ = this.flagship.getFlag('welcome-message', 'Hello!')
}

Structural Directive

<div *ifFlag="'beta-feature'; else fallback">Welcome to the beta!</div>
<ng-template #fallback>
  <p>This feature is coming soon.</p>
</ng-template>

Pipe

<h1>{{ 'welcome-message' | flagValue:'Hello, World!' }}</h1>

Route Guard

Use FlagShipGuard with route data to protect routes behind feature flags:

import { FlagShipGuard } from '@arlioz/flagship-angular-legacy'

const routes: Routes = [
  {
    path: 'beta-dashboard',
    component: BetaDashboardComponent,
    canActivate: [FlagShipGuard],
    data: { flagKey: 'beta-dashboard', redirectTo: '/home' },
  },
]

User Targeting

@Component({
  /* ... */
})
export class AppComponent {
  constructor(private flagship: FlagShipService) {}

  async onLogin(user: { id: string; plan: string }) {
    await this.flagship.identify(user.id, { plan: user.plan })
  }
}

API Reference

FlagShipService

| Method | Return | Description | | --------------------------------------- | --------------------------------- | --------------------------------------- | | getFlag<T>(key, defaultValue) | Observable<T> | Single flag value, emits only on change | | getFlags() | Observable<Record<string, any>> | All flag values | | getFlagSnapshot<T>(key, defaultValue) | T | Synchronous read from cache | | identify(userId, attributes?) | Promise<void> | Update user context and re-fetch flags |

IfFlagDirective

<div *ifFlag="'flag-key'">Shown when flag is true</div>
<div *ifFlag="'flag-key'; else other">With else template</div>

FlagValuePipe

{{ 'flag-key' | flagValue:'default value' }}

FlagShipGuard

Class-based CanActivate guard. Configure via route data:

| Data property | Type | Default | Description | | ------------- | -------- | ------- | ---------------------------------- | | flagKey | string | — | Feature flag key to check | | redirectTo | string | '/' | Redirect URL when flag is disabled |

Compatibility

| Angular | Status | | ------- | --------- | | 10.x | Supported | | 11.x | Supported | | 12.x | Supported | | 13.x | Supported | | 14.x | Supported | | 15.x | Supported |

Migrating to @arlioz/flagship-angular

When upgrading to Angular 16+, switch to @arlioz/flagship-angular for:

  • Signal APIflag() and flags() for zoneless change detection
  • Standalone componentsprovideFlagShip() without NgModule
  • Functional guardsflagGuard() instead of class-based FlagShipGuard

License

MIT