angular-live-or-test
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.
Installing
$ npm install angular-live-or-test
Setup
angular;
API
live
Service: 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.
testBadge
Directive: Displays a badge that is synced to the live mode setting.
Test