Search code examples
ionic-frameworkionic-view

Ionic Webview Loading Black Screen on Android


I am working on Ionic and I have noticed that while my app's webview is being loaded, black screen is shown. Is there a way to replace that black screen with a picture or at least to style to different color?

Thank you in advance


Solution

  • Yes this is very easy. Its called splash screen.Take a look. if you want to auto create this screens from one image take a look on thisImage Generation, if you need progress bar also then please thake a look on this link

        angular.module('LoadingApp', ['ionic'])
    .controller('LoadingCtrl', function($scope, $ionicLoading) {
      $scope.show = function() {
        $ionicLoading.show({
          template: 'Loading...'
        }).then(function(){
           console.log("The loading indicator is now displayed");
        });
      };
      $scope.hide = function(){
        $ionicLoading.hide().then(function(){
           console.log("The loading indicator is now hidden");
        });
      };
    });