Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

org.webjars.npm:v-button

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

org.webjars.npm:v-button

WebJar for v-button

  • 1.1.1
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

AngularJS pressable button with a busy indicator

AngularJS directives allow you to create buttons with a nice ripple effect and "busy" indicator. Inspired by Google material design.

Demos

Installation

  • Use bower bower install v-button, or download files from the github repo
  • Reference v-button.css and v-button.js in your index.html file
  • Reference the module in your app: angular.module('myApp', [ 'vButton' ])

Usage

app.js

angular.module('myApp', ['vButton'])

.controller('MyCtrl', function ($scope) {
  $scope.isBusy = false;

  $scope.buttonClick = function () {
    $scope.isBusy = !$scope.isBusy;
  };
});

index.html

<button class="Button" ng-click="isBusy = !isBusy" v-busy="isBusy" v-busy-label="Please wait" v-pressable>Busy Button</button>

Result html: (if button is pressed and the isBusy value is equal true)

<button class="Button is-busy is-pressed" ng-click="isBusy = !isBusy" v-busy="isBusy" v-busy-label="Please wait" v-pressable>
  <span>Please wait</span>
  <v-ripple></v-ripple>
</button>

When working with attribute having dynamic values (here we have an example with angular-translate), you may do it like this:

<button class="Button" ng-click="isBusy = !isBusy" v-busy="isBusy" v-busy-label="{{'translation_key' | translate}}" v-busy-text="{{'translation_key' | translate}}"  v-pressable><span translate>translation_key</span></button>

FAQs

Package last updated on 05 Apr 2016

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc