Hi Dawg,

You are missing the part that you return an array. The ? operator and 
arrays are not a perfect fit.

change:
this.getInfService.getUserMethod(this.userID)
 .subscribe(data => this.userDetails = data);

Into:
this.getInfService.getUserMethod(this.userID)
.subscribe(data => this.userDetails = data[0]);

And then use the ? operator in your template.like:
 {{userDetails?.firstname}} 

Regards
Sander

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to