Code Monkey home page Code Monkey logo

ng-busy's Introduction

ng-busy  Build Status

An AngularJS module for reacting to when your app is busy.

About

You may wish for a simple way of letting your parts of your UI know the app is doing something. A simple example is a submit button that lets the user know their request is being processed, and for it to be disabled until the request is complete so they don't submit twice. This module can help. You can go here for a demo.

========

Copyright Mike Grabski @HackedByChinese

Licensed under MIT

Requirements

  • Angular 1.2.0 or later

What NgBusy Does

Check out the Overview in the wiki.

Getting Started

Include angular-busy.js after angular.js.

Bare bones example:

angular.module('demo', ['ngBusy'])
    .controller('DemoCtrl', function($scope, $http) {
      $scope.submit = function() {
        // some arbitrary code that triggers an HTTP request
        $http.post('/path', {message: 'Hello world'});
      };
    });

In a partial:

<div ng-controller="DemoCtrl">
  <button busy="Submitting.." ng-click="submit()">Submit</button>
</div>

When "Submit" makes an $http request, the content of button will be replaced with a busy message. When the request completes, either by rejection or success, the content of the button will be restored.

Roadmap

??

Contributing

Contributors are welcome. I use the git-flow lifecyle, so master is the stable release and development is where latest ongoing development is happening.

Developing

You will need Node/NPM, Grunt, and Bower. Once you checkout from git, run npm install then bower install to get dependencies.

Testing

Use grunt test to run unit tests once, or grunt test-server to run them continuously.

ng-busy's People

Contributors

moribvndvs avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.