Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

zentetsukenz/angular-splash-loading

Repository files navigation

Build Status

Angular Splash Loading

An AngularJS service splash screen with loading indicator. It uses angular-ui-bootstrap $modal under the hood.

Installation

Just install using bower

bower install angular-splash-loading

Usage

  1. Inject splashLoading service into your controller.
  2. Use splashLoading.open() to open the splash screen. By default splashLoading.open() accepts an object that will be passed into $modal scope. The default template accepts property name called title and message.

Usage example

var splashWait = splashLoading.open({
  title: 'Processing',
  message: 'Please wait...'
});

splashWait.opened.then(function () {
  Payment.someLongRunningAPI($scope.data).$promise
  .then(function () {
    // This is necessary, as the splash screen will not disappear if .close() is not called.
    splashWait.close({success: true});
  })
  // Just in case something happen.
  .catch(function () {
    splashWait.close({success: false});
  });
});

Contributing to the project

Please follow Contributing to open source for the contribution guidelines.

Please also follow Gitflow Workflow, using git-flow cheatsheet should do the job.

License

Angular Splash Loading is under MIT license. Please see License file for more information.

About

A splash loading screen for AngularJS

Resources

License

Stars

Watchers

Forks

Packages

No packages published