Passing a String in a Method of Submit Giving undefined in Angular 7

15 views
Skip to first unread message

Aneesking 2

unread,
Dec 28, 2019, 1:52:32 PM12/28/19
to Angular and AngularJS discussion
Passing a String in a Method of Submit Giving undefined error in Angular 7.


I am getting error so anyone who knows Angular 7 then please add me in Skype: aneesking2

This is code:
  validateEmailUser(Email:string)
{
  console.log('This called',Email);
  
  this.httpclient.post('http://localhost:65513/check-emails',{Email}).subscribe(
    (response=>{
      this.toastr.success('User Deleted Successfully');

  });
    

Olaleye Israel

unread,
Dec 29, 2019, 4:12:30 PM12/29/19
to ang...@googlegroups.com



Complete code

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular/55f52eae-c7c6-463c-a7db-e845e43fc030%40googlegroups.com.

Asad Fiaz

unread,
Dec 29, 2019, 11:42:03 PM12/29/19
to Angular and AngularJS discussion
I have edited the code and this will work perfect. You should write your url in the following format


On Saturday, December 28, 2019 at 11:52:32 PM UTC+5, Aneesking 2 wrote:
Passing a String in a Method of Submit Giving undefined error in Angular 7.


I am getting error so anyone who knows Angular 7 then please add me in Skype: aneesking2

This is code:
  validateEmailUser(Email:string)
{
  console.log('This called',Email);
  
  this.httpclient.post(`$http://localhost:65513/check-emails`,Email).subscribe(
Reply all
Reply to author
Forward
0 new messages