Data not Binding to Front View


#1

I need to get data in front of UserName and Email of home.html. But Now I’m getting like below

home.ts

ngOnInit() {
    this.resetForm();
    this.userClaims= this.userService.userClaims;
  }

home.html

 <div class="card-content">
        <span>Username :{{userClaims.Name}}</span>
        <br>
        <span>Email : {{userClaims}}</span>
        <br>     
      </div>

I’m getting data in console as the below image


app-data.service.ts

sendMobileNo(mobno) {
        var data = "MobileNo=" + mobno;
        var reqHeader = new HttpHeaders({ 'Content-Type': 'application/json'});
       var url=this.uihelper.CallWebAPIUrlNew("/Tenant/GetTenantsByMobile")+"?"+data;
        return this.http.get(url).map((response: Response) => {
            var data = response.json();
            this.userClaims(data);
        });

This is the initial component, from where, I’m calling service by sending mobno as parameter
register.ts

OnSubmit(mobno){
    this.regService.sendMobileNo(mobno).subscribe((data : any)=>{
      this.navCtrl.push(HomePage);
    },
   (err : HttpErrorResponse)=>{
     this.isLoginError = true;
   });

register.html

<form id="register-form3" #registrationForm="ngForm" (ngSubmit)="OnSubmit(MobileNo.value)">
    <ion-list id="register-list11">
      <ion-item id="register-input8">
        <ion-label>
          Phone Number
        </ion-label>
        <ion-input type="number" #MobileNo ngModel name="MobileNo"placeholder=""></ion-input>
      </ion-item>
    </ion-list>
    <button id="register-button7" ion-button color="positive" block on-click="goToBankList()">
      Search Bank
    </button>
  </form>

Can anyone please help me with correction needed…


#2

wehre is your following method defined, post its code or make sure its retruning something.