Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

angular-live-or-test

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-live-or-test

Angular service and directive for toggling and indicating "live" and "test" modes

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

angular-live-or-test Build Status

Angular service and directive for toggling and indicating "live" and "test" modes. If you've ever used Stripe, you've seen how you can toggle between "live" and "test" from your dashboard. In test mode, the dashboard displays a badge reminding the user that they're in test mode. This allow you to replicate that effect.

Stripe test badge

Installing

$ npm install angular-live-or-test

Setup

angular.module('myApp', [
  require('angular-live-or-test')
]);

API

Service: live

live.enabled([Boolean]) -> Boolean

When either true or false is passed, live mode is enabled or disabled, respectively. If no argument is passed, the current setting is returned. live is a singleton. Your application can only have one live setting.

Directive: testBadge

Displays a badge that is synced to the live mode setting.

<test-badge>
  <h2>Test</h2>
</test-badge>

Keywords

angular

FAQs

Package last updated on 09 Jan 2015

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