title: ionic white screen after splashscreen
body: <p>I wrote a script to detect if there is a wifi connection or not. However, I noticed, that if the app starts when there is no wifi connection, the splashscreen will load and then i'll get a white screen. The console shows this error: </p>
  
  <blockquote>
    <p>Failed to load resource: net::ERR_INTERNET_DISCONNECTED</p>
  </blockquote>
  
  <p>this is my script for detecting the wifi and its placed in the '$ionicPlatform.ready': </p>
  
  <pre><code>$rootScope.$on('$cordovaNetwork:offline', function(event, networkState)
      {
        connectionerror($ionicPopup)
      })
  
      //display error msg and close the app.
      function connectionerror($ionicPopup,$scope)
      {
        var myPopup = $ionicPopup.show({ 
          title: 'Network Error',
          content: 'No internet connectivity detected. Please try again.',
          buttons: [
          {
            text: '&lt;b&gt;Retry&lt;/b&gt;',
            type: 'button-positive',
            onTap: function(e) 
            {
              if (!$cordovaNetwork.isOnline()) 
              {
                e.preventDefault();  
              }
              else 
              {
                $state.reload();
              }
            }
          }]
        });
      } 
  </code></pre>
  
  <p>How do I fix it so that after the splashscreen, if there is no wifi, the message would show ? </p>