title: Bind data from ionic to iframe(own website)
body: <p>I want bind the data in ionic that i inserted for login and then iframe to my own website page ,the database is already connected in within both. </p>
  
  <p>In other word says is  when i use ionic login and it success authentication with the php and then it will redirect to it own account.</p>
  
  <p>Help me check which part should i improve.</p>
  
  <p>login.ts</p>
  
  <pre><code> login(){
   this.authService.postData(this.userData,'login').then((result) =&gt; {
    this.responseData = result;
    if(this.responseData.userData){
    console.log(this.responseData);
    localStorage.setItem('userData', JSON.stringify(this.responseData));
    this. presentLoadingDefault();
    this.navCtrl.push(HomePage);
    }
    else{ {swal({
      title: "Invalid Username or Password",
      text: "Please Try Again",
      icon: "warning", })
       } }
  }, (err) =&gt; { console.log("something wrong~")
    // Error log
  });
  
   }  
  </code></pre>
  
  <p>auth-service.ts</p>
  
  <pre><code>postData(credentials, type) {
  return new Promise((resolve, reject) =&gt; {
    let headers = new Headers();
  
    this.http.post(apiUrl + type, JSON.stringify(credentials), {headers: headers})
      .subscribe(res =&gt; {
        resolve(res.json());
      }, (err) =&gt; {
        reject(err);
      });
  });
  }
  </code></pre>
  
  <p>home.html</p>
  
  <pre><code>  &lt;html&gt;
   &lt;ion-header&gt;
    &lt;ion-navbar&gt;
   &lt;img ion-right class="navbarLogo" /&gt;
     &lt;ion-title&gt;Home&lt;/ion-title&gt;
   &lt;/ion-navbar&gt;
   &lt;/ion-header&gt;
  
   &lt;ion-content class='padding has-subheader' scroll="true" overflow-scroll="true"&gt;
     &lt;iframe class='webPage' name="eventsPage" src="http://www.wiptrainee.com/taxsentral/member/dashboard.php"&gt;
    &lt;/iframe&gt;
   &lt;/ion-content&gt;
   &lt;/html&gt;
  </code></pre>