title: How do i push login page if there is no internet connection
body: <p>i want to always show whether <code>internet</code> <code>connection</code> is there or not? without </p>
  
  <p><code>subscribing</code> for <code>network</code> <code>changes</code>.</p>
  
  <p><strong>My Question: on launch of the app i want to check internet connection. if it is not there i want to present <code>notification</code></strong></p>
  
  <p>here is what i have done: </p>
  
  <p><strong>if there is no internet connection then i want to push login page</strong></p>
  
  <p><strong>the below code works <code>perfect</code> on <code>network</code> <code>changes</code>  but i'm unable to detect the status whether it connected or not to push loginPage?</strong></p>
  
  <pre><code>  displayNetworkUpdate(connectionState: string){
      let networkType = this.network.type;
  
  
      this.toastCtrl.create({
        message: `You are now ${connectionState} via ${networkType}`,
        duration: 3000
      }).present();
    }
  
  
  
  
    ionViewDidEnter() {
  
         this.network.onConnect().subscribe(data =&gt; {
          console.log(data)
          this.displayNetworkUpdate(data.type);
        }, error =&gt; console.error(error));
  
        this.network.onDisconnect().subscribe(data =&gt; {
          console.log(data)
          this.displayNetworkUpdate(data.type);
        }, error =&gt; console.error(error));
  
  
    }
  </code></pre>
  
  <p><strong>the above code works <code>perfect</code> on <code>network</code> <code>changes</code>  but i'm unable to detect the status whether it connected or not to push loginPage?</strong></p>