title: Supplied parameters do not match any signature of call target - Typescript - header compoent
body: <p>I am making an http get request but the Supplied parameters do not match any signature of call target. How do i correct this?</p>
  <blockquote>
  <p>ERROR in D:/xampp/htdocs/angular2/src/$$_gendir/app/header/header.component.ngfactory.ts (17017,35): Supplied parameters do not match any signature of call target.</p>
  <p>ERROR in D:/xampp/htdocs/angular2/src/$$_gendir/app/header/header.component.ngfactory.ts (17017,35): Supplied parameters do not match any signature of call target.</p>
  </blockquote>
  <p><strong>my header component</strong></p>
  <pre><code>import { Component, Renderer } from '@angular/core';
  import { Title, DOCUMENT } from '@angular/platform-browser';
  import { CountriesService } from '../services/countries.services';
  import { Router, ActivatedRoute, Params } from '@angular/router';
  import { AuthenticationService } from '../services/authentication.service';
  
  import { FacebookService, InitParams, LoginResponse } from 'ngx-facebook';
  
  
  @Component({
      moduleId: module.id,
      selector: 'app-header',
      templateUrl: 'header.component.html',
      styleUrls: ['../app.component.css'],
  })
  export class HeaderComponent {
  
  
      searchResultData: any = {};
      SearchParams: any = {};
      SearchResultChk: any = {};
      loginfailedmsg = false;
      registerfailedmsg = false;
      registersuccessmsg = false;
      pswdsuccessmsg = false;
      pswdfailedmsg = false;
  
      countrieslist: any = {};
      model: any = {};
  
      loading = false;
      returnUrl: string;
      responseData: any = {};
      loginStatus = 0;
      loginsuccessmsg = false;
      Forgotpasswordcont = false;
      LoginwithEmail = false;
      registerwithemail = false;
  
      public visible = false;
      public visibleAnimate = false;
  
      registerformcont = false;
      registerActive = true;
      loginactive = false;
      currentUser: any = {};
      PopupTitle = '';
      callBackfunc = '';
      responseNameCheck: any = {};
      LoginOptions: any = {};
      response: any = {};
      FacebookResponse: any = {};
  
      constructor(title: Title,
                  private countriesService: CountriesService,
                  private Router: Router,
                  private authenticationService: AuthenticationService,
                  private fb: FacebookService) {
  
          let initParams: InitParams = {
              appId: '************',
              cookie: true,
              xfbml: true,
              version: 'v2.8'
          };
  
          fb.init(initParams);
  
          Router.events.subscribe((val) =&gt; {
              this.searchResultCont = false;
              this.showStyle = false;
          });
      }
  
      fbloginAuth(FacebookResponseparam) {
          this.authenticationService.facebookloginregister(FacebookResponseparam)
              .subscribe(
                  data =&gt; {
                      this.responseData = data;
                      this.loading = false;
  
                      if (this.responseData.status == 1) {
  
                          this.registersuccessmsg = true;
                          //  this.loginfailedmsg= false;
                          this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
                          if (this.currentUser) {
                              this.loginStatus = this.currentUser.status;
                          }
                          setTimeout(() =&gt; this.visible = false, 2000);
  
                      } else {
                          this.registersuccessmsg = false;
                          this.registerfailedmsg = true;
                      }
                  },
                  error =&gt; {
                      this.loginfailedmsg = true;
                      this.loading = false;
                  });
      }
  
  
      loginWithFacebook(): void {
  
          this.fb.login()
              .then((response: LoginResponse) =&gt; {
                  this.response = response;
                  console.log(response);
  
                  this.fb.api('/me?fields=first_name, last_name, picture, email', 'get', {'accesstoken': this.response.accessToken})
                      .then(res =&gt; {
  
                          if (res.id) {
                              this.FacebookResponse = res;
                              this.fbloginAuth(this.FacebookResponse);
  
                          } else {
                              this.registersuccessmsg = false;
                              this.registerfailedmsg = true;
                          }
                      })
                      .catch(e =&gt; console.log(e));
  
              })
              .catch((error: any) =&gt; console.error(error));
  
      }
  
  
      ngOnInit() {
  
          this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
          if (this.currentUser) {
              this.loginStatus = this.currentUser.status;
          }
      }
  
  
      forgotpassword() {
          this.loading = true;
          this.authenticationService.forgotpassword(this.model.emailid)
              .subscribe(
                  data =&gt; {
  
                      this.responseData = data;
                      this.loading = false;
                      this.pswdsuccessmsg = false;
                      this.pswdfailedmsg = false;
  
                      if (this.responseData.status) {
                          this.pswdsuccessmsg = true;
                          this.PopupTitle = 'Email sent';
                          this.Forgotpasswordcont = true;
                          this.callBackfunc = '';
  
                      } else {
                          this.pswdfailedmsg = true;
                      }
                  },
                  error =&gt; {
                      this.loginfailedmsg = true;
                      this.loading = false;
                  });
      }
  
      login() {
  
          this.loading = true;
          this.authenticationService.login(this.model.username, this.model.lpassword)
              .subscribe(
                  data =&gt; {
  
                      this.responseData = data;
                      this.loading = false;
  
                      if (this.responseData.status) {
  
                          this.loginsuccessmsg = true;
                          this.loginfailedmsg = false;
                          this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
                          if (this.currentUser) {
                              this.loginStatus = this.currentUser.status;
                          }
                          setTimeout(() =&gt; this.visible = false, 2000);
  
                      } else {
                          this.loginsuccessmsg = false;
                          this.loginfailedmsg = true;
                      }
                  },
                  error =&gt; {
                      this.loginfailedmsg = true;
                      this.loading = false;
                  });
      }
  
      logout() {
          if (confirm('Are you sure you want to logout?')) {
              this.loginStatus = 0;
              localStorage.removeItem('currentUser');
          }
      }
  
  
      register() {
  
          this.loading = true;
  
          this.authenticationService.usernamecheck(this.model.username)
              .subscribe(
                  data =&gt; {
                      this.responseNameCheck = data;
                      // console.log(this.responseNameCheck);
                  });
          if (this.responseNameCheck.status == 0) {
              this.registerwithemail = true;
              this.callBackfunc = 'registerwithemail';
              this.loading = false;
              return false;
          } else {
              this.authenticationService.register(this.model)
                  .subscribe(
                      data =&gt; {
                          this.responseData = data;
                          this.loading = false;
  
                          if (this.responseData.status) {
                              this.model = '';
                              this.registerfailedmsg = false;
                              this.registersuccessmsg = true;
                              // setTimeout(() =&gt; this.visible = false, 2000);
                              this.showmodel('loginwithemail');
  
                          } else {
                              this.callBackfunc = 'registerwithemail';
                              // this.stepone= true;
                              this.registersuccessmsg = false;
                              this.registerfailedmsg = true;
                          }
  
                      },
                      error =&gt; {
                          this.loginfailedmsg = true;
                          this.loading = false;
                      });
          }
      }
  }
  </code></pre>
  <p><strong>authentication.service.ts</strong></p>
  <pre><code>import { Injectable } from '@angular/core';
  import { Http, Headers, Response } from '@angular/http';
  import { Observable } from 'rxjs/Observable';
  import 'rxjs/add/operator/map'
  import { environment } from 'environments/environment';
  
  
  @Injectable()
  export class AuthenticationService {
      constructor(private http: Http) { }
  
      private LoginUrl = environment.ApiEndPointLoginURL;
      private RegisterURL = environment.ApiEndPointRegisterURL;
      private ForgotPswdURL = environment.ApiEndPointForgotPswdURL;
      private UsernameCheckURL = environment.ApiEndPointUsernameChkURL;
      private FacebookURL = environment.ApiEndPointFacebookURL;
  
      
      forgotpassword(email: any):Observable&lt;Response&gt;{
          let headers = new Headers();
          headers.append('Content-Type', 'application/x-www-form-urlencoded');
          headers.append('Access-Control-Allow-Methods', 'GET,PUT,POST,OPTIONS');
          headers.append('Access-Control-Allow-Origin', '*');
          
          //let params =    &quot;emailid=&quot;+email;
          let params = {
              emailid: email
              }
  
          return this.http.post(this.ForgotPswdURL, params,{headers: headers})
                  .map((response: Response) =&gt; { 
                      let user = response.json();     
                      return user;
                  });
      }
      
  
      usernamecheck(username: any):Observable&lt;Response&gt;{
          let headers = new Headers();
          headers.append('Content-Type', 'application/x-www-form-urlencoded');
          headers.append('Access-Control-Allow-Methods', 'GET,PUT,POST,OPTIONS');
          headers.append('Access-Control-Allow-Origin', '*');
          
      // let params =    &quot;username=&quot;+username;
          let params = {
              username: username
          }
          
          return this.http.post(this.UsernameCheckURL, params,{headers: headers})
                  .map((response: Response) =&gt; { 
                      let user = response.json();     
                      return user;
                  });
      }
  
      facebookloginregister(userDetails: any){
          let headers = new Headers();
          headers.append('Content-Type', 'application/x-www-form-urlencoded');
          headers.append('Access-Control-Allow-Methods', 'GET,PUT,POST,OPTIONS');
          headers.append('Access-Control-Allow-Origin', '*');
          
      /* let params =    &quot;name=&quot;+userDetails.first_name+&quot; &quot;+userDetails.last_name+&quot;&amp;email=&quot;+userDetails.email+
          &quot;&amp;imgurl=&quot;+userDetails.picture.data.url+&quot;&amp;fb_id=&quot;+userDetails.id;*/
          
          let params = {
              name: userDetails.first_name+&quot; &quot;+userDetails.last_name,
              email:userDetails.email,
              imgurl:userDetails.picture.data.url,
              fb_id:userDetails.id
          }
  
          return this.http.post(this.FacebookURL, params,{headers: headers})
                  .map((response: Response) =&gt; { 
                      let user = response.json();     
              
                      if (user &amp;&amp; user.status) {                    
                          localStorage.setItem('currentUser', JSON.stringify(user));
                          return user;
                      }else{
                          return user;
                      }
  
                  });
      }
  
  
  
  
      login(username: any, password: any) {
      let headers = new Headers();
      headers.append('Content-Type', 'application/x-www-form-urlencoded');
      headers.append('Access-Control-Allow-Methods', 'GET,PUT,POST,OPTIONS');
      headers.append('Access-Control-Allow-Origin', '*');
      
      // let params =    &quot;email=&quot;+username+&quot;&amp;password=&quot;+password;
      let params = {
              email: username,
              password:password
          }
  
      //console.log(params);
  
      return this.http.post(this.LoginUrl, params,{headers: headers})
              .map((response: Response) =&gt; {   
  
                  let user = response.json();     
              
                  if (user &amp;&amp; user.status) {                    
                      localStorage.setItem('currentUser', JSON.stringify(user));
                      return user;
                  }else{
                      return user;
                  }
              });
      }
  
  
  
      register(user: any){
      let headers = new Headers();
      headers.append('Content-Type', 'application/x-www-form-urlencoded');
      headers.append('Access-Control-Allow-Methods', 'GET,PUT,POST,OPTIONS');
      headers.append('Access-Control-Allow-Origin', '*');
      
      //let params =    &quot;name=&quot;+ user.firstName+&quot;&amp;email=&quot;+ user.email+&quot; &amp;password=&quot;+user.password+&quot;&amp;country=&quot;+user.country;      
  
      let params = {
              name: user.firstName,
              email:user.email,
              password:user.password,
              country:user.country
          }
      return this.http.post(this.RegisterURL, params,{headers: headers})
              .map((response: Response) =&gt; {   
                  let user = response.json();     
                  return user;
              });
      }
  
  }
  
  
  
      
  </code></pre>