You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@emartech/angular-suite-flipper

Package Overview
Dependencies
Maintainers
103
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emartech/angular-suite-flipper

Angular module for Suite FLipper

2.1.2
latest
Source
npm
Version published
Weekly downloads
9
-76.32%
Maintainers
103
Weekly downloads
 
Created
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

angular

FAQs

Package last updated on 09 Jul 2020

Did you know?

Socket

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