Issue
I need to contact the name and surname in my Ionic 4 Full Starter kit template:
<app-text-shell [data]="customer?.surname + customer?.name"></app-text-shell>
Unfortunately there is not the space between them; how Can I do? If I create a function in customer link getNameAndSurname() there is a message error.
Solution
Simply Pass this way
<app-text-shell [data]="customer?.surname +" "+ customer?.name"></app-text-shell>
add space
+" "+
or
customer = { surname: "weerasinghe", name: "chanaka" };
.html
<app-text-shell [data]="customer"></app-text-shell>
Access data
this.data.surname
Answered By - Chanaka Weerasinghe
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.