Socket
Socket
Sign inDemoInstall

@emartech/angular-suite-flipper

Package Overview
Dependencies
0
Maintainers
103
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @emartech/angular-suite-flipper

Angular module for Suite FLipper


Version published
Weekly downloads
33
increased by37.5%
Maintainers
103
Install size
20.1 kB
Created
Weekly downloads
 

Readme

Source

Angular Suite Flipper

This is a simple flipper solution for angular. You should provide the flippers.

Install

npm install --save @emartech/angular-suite-flipper

Setup

import { FlipperModule } from '@emartech/angular-suite-flipper';

@NgModule({
  imports: [
    BrowserModule,
    FlipperModule.create(['dummy', 'test'])
  ],
  declarations: [AppComponent],
  bootstrap:    [AppComponent]
})
export class AppModule { }

Usage in template


import { IsOnPipe } from '@emartech/angular-suite-flipper';
import { IsOffPipe } from '@emartech/angular-suite-flipper';

@Component({
  selector: '<sub-app>',
  template: `
    <h1 *ngIf="'dummy' | isOff">With</h1>
    <h1 *ngIf="'dummy' | isOn">Without</h1>
  `
})
export class App {}

Usage in Controller


import { FlipperService } from '@emartech/angular-suite-flipper';

@Component({
  selector: '<sub-app>',
  template: `Some content`
})
export class App {

  constructor(flipperService: FlipperService) {
    if (flipperService.isOn('dummy')) console.log(1);
    if (flipperService.isOff('dummy')) console.log(2);
  }
}

Keywords

FAQs

Last updated on 09 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc