title: Ionic 2 : Programmatically restart app fail with internet test connection
body: <p>I have to build an Ionic 2 app with possibility to logout. So, when my user logout, I have to clear all component and come back to the login page. 
  I use this method to do that : </p>
  
  <pre><code>initialHref = window.location.href;
  logout() {
          navigator.splashscreen.show();
          window.location.assign(this.initialHref);
  }
  </code></pre>
  
  <p>But I have a problem. I have to test user internet connection for some task in my app. I have a method to test that :</p>
  
  <pre><code>getInternetConnection() : string {
      let networkState = navigator.connection.type;
      let states = {};
      states[Connection.UNKNOWN]  = 'unknown';
      states[Connection.ETHERNET] = 'ethernet';
      states[Connection.WIFI]     = 'wifi';
      states[Connection.CELL_2G]  = '2g';
      states[Connection.CELL_3G]  = '3g';
      states[Connection.CELL_4G]  = '4g';
      states[Connection.CELL]     = 'generic';
      states[Connection.NONE]     = 'not-connected';
  
      return states[networkState];
    }
  </code></pre>
  
  <p>The problem : When I use my logout method, my app stay in the splashscreen indefinitely. I have this error in Android Studio : </p>
  
  <pre><code>06-14 11:27:39.728 14192-14192/com.ionicframework.myapp722890 I/chromium: [INFO:CONSOLE(85505)] "ReferenceError: Connection is not defined
  at PTools.getInternetConnexion (file:///android_asset/www/build/main.js:5999:16)
  at PDataManager.isConnected (file:///android_asset/www/build/main.js:10648:40)
  at new PDataManager (file:///android_asset/www/build/main.js:10367:14)
  at AppModuleInjector.get (/AppModule/module.ngfactory.js:343:69)
  at AppModuleInjector.getInternal (/AppModule/module.ngfactory.js:481:53)
  at AppModuleInjector.NgModuleInjector.get (file:///android_asset/www/build/main.js:86063:44)
  at CompiledTemplate.proxyViewClass.AppView.injectorGet (file:///android_asset/www/build/main.js:154924:45)
  at CompiledTemplate.proxyViewClass.DebugAppView.injectorGet (file:///android_asset/www/build/main.js:155352:49)
  at ElementInjector.get (file:///android_asset/www/build/main.js:154428:27)
  at CompiledTemplate.proxyViewClass.AppView.injectorGet (file:///android_asset/www/build/main.js:154924:45)
  at CompiledTemplate.proxyViewClass.DebugAppView.injectorGet (file:///android_asset/www/build/main.js:155352:49)
  at ElementInjector.get (file:///android_asset/www/build/main.js:154428:27)
  at ReflectiveInjector_._getByKeyDefault (file:///android_asset/www/build/main.js:154185:24)
  at ReflectiveInjector_._getByKey (file:///android_asset/www/build/main.js:154120:25)
  at ReflectiveInjector_.get (file:///android_asset/www/build/main.js:153989:21)", source: file:///android_asset/www/build/main.js (85505)
  </code></pre>
  
  <p>I don't know what I have to do to resolve this problem. 
  Maybe I can :
  Find another method to logout ?
  Find another method to test internet connection ?
  I have to keep this two functionnality. 
  When I use app for the first time, my internet connection test works well.</p>
  
  <p>Any idea ? </p>