Skip to content

coldbess/blockUI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation


blockUI AngularJS Service

blockUI service/provider for AngularJS inspired by blockUI jQuery plugin.

How to use it

Include the service in your application

```coffeescript 'use strict'

app = angular.module('BlockUI'])

<h4>Default options</h4>

```coffeescript
# Overwrite what you need
defaults =
  # messageClass: 'blockui-message' # from user (optional) - styling purposes
  # backdropClass: 'blockui-backdrop' # from user (optional) - styling purposes
  innerHTML: 'Loading ...' # Overwrite this with your content i.e. <img src="/some/path"/>
  blockUIClass: "blockui-blocked" # this class will be appended to the body

Inject the service into your controller

```coffeescript 'use strict'

angular.module('Controllers') .controller 'demoCtrl', ['$blockUI', ($blockUI) -> $scope.demoMethod = -> blockUI = $blockUI.createBlockUI innerHTML: "Waiting for data ..." blockUI.blockUI() waitForSomethingFunction (success)-> blockUI.unblockUI() console.log "Success callback - unblocking" ]

<h2>Demo</h2>
WIP

About

blockUI service/provider for AngularJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published