ionic loading(加载动作)

1、Html


    
    腾讯新闻



    
    
    
        {{stooge.name}}
    

2、Controller

appCntrollers.controller('ManageLoadingCtrl', function ($scope, $timeout, $ionicLoading) {
    $scope.click = function () {
        $ionicLoading.show({
            template: 'Loading...',
        });

        $timeout(function () {
            $ionicLoading.hide();
        }, 2000);
    }

    $scope.clickLoading = function () {
        $ionicLoading.show({
            content: 'Loading',
            animation: 'fade-in',
            showBackdrop: true,
            maxWidth: 200,
            showDelay: 0
        });

        $timeout(function () {
            $ionicLoading.hide();
            $scope.stooges = [
                { name: 'Moe' },
                { name: 'Larry' },
                { name: 'Curly' }
            ];
        }, 2000);
    }
})

3、效果图

ionic loading(加载动作)_第1张图片

ionic loading(加载动作)_第2张图片

ionic loading(加载动作)_第3张图片


你可能感兴趣的:(Ionic)