An AngularJS service splash screen with loading indicator. It uses angular-ui-bootstrap $modal under the hood.
Just install using bower
bower install angular-splash-loading
- Inject
splashLoading
service into your controller. - Use
splashLoading.open()
to open the splash screen. By defaultsplashLoading.open()
accepts an object that will be passed into$modal
scope. The default template accepts property name calledtitle
andmessage
.
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});
});
});
Please follow Contributing to open source for the contribution guidelines.
Please also follow Gitflow Workflow, using git-flow cheatsheet should do the job.
Angular Splash Loading is under MIT license. Please see License file for more information.