Thursday, 1 June 2017

Http post method in ionic 2

i tried sending parameters to my node server and i get error like this "Uncaught (in promise): Error: No provider for Http! Error: No provider for Http! at injectionError" i

let postParams = {

            name: "RAJ",
            username: "RAJ",
            email: "RAJ",
            pass: "RAJ"

}
this.http.post("http://localhost:8080/users", postParams, options)
  .subscribe(data => {
    console.log(data['_body']);
   }, error => {
    console.log(error);// Error getting the data
  });`



via RajaSekar

No comments:

Post a Comment