Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49526

Check if data exist before post

$
0
0

@khalilben wrote:

Hi,

As i said i want to check if there’s some data before posting it

connexion(){
  var headers = new Headers();
  headers.append('Content-Type', 'application/x-www-form-urlencoded');

  var params = 'email='+this.userData.email+'&passe='+this.userData.passe;
  this.http.post(apiUrl, params , {headers: headers})
  .subscribe(
    data => {
      //console.log(this.responseData),
      this.storage.set('utilisateurData', data);
      this.navCtrl.push('ProfilPage');
    },
    err => {
      console.log(err);
    },
    () => console.log('Call Complete')
  );

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 49526

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>