Skip to content

Instantly share code, notes, and snippets.

@brunoksato
Created November 19, 2014 23:44
Show Gist options
  • Save brunoksato/07a3716bd395fbd2b79a to your computer and use it in GitHub Desktop.
Save brunoksato/07a3716bd395fbd2b79a to your computer and use it in GitHub Desktop.
Ionic Loading
angular.module('ionicApp', ['ionic'])
.controller('AppCtrl', function($scope, $timeout, $ionicLoading) {
// Setup the loader
$scope.loading = $ionicLoading.show({
content: '<i class="icon ion-loading-c"></i>',
animation: 'fade-in',
showBackdrop: false,
maxWidth: 50,
showDelay: 0
});
// Set a timeout to clear loader, however you would actually call the $scope.loading.hiazde(); method whenever everything is ready or loaded.
$timeout(function () {
$scope.stooges = [{name: 'Moe'}, {name: 'Larry'}, {name: 'Curly'}];
$scope.loading.hide();
}, 1000000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment