Hello,
I have a template as follow:
<ion-content>
<h3>Account#: {{ (customer | async)?.accountNo }}</h3>
<h3>CustId: {{ (customer | async)?.id }}</h3>
<h3>Name: {{ (customer | async)?.name }}</h3>
<ion-button (click)="setDefault(customer)">
Set As Default
</ion-button>
</ion-content>
the customer is a Promise<Customer> that was retrieved earlier from a
service call. So the properties of the Customer will displayed once the
promise resolved. However, the promise is currently passed as is to the
click handler, is there anyway i can pass the value of the promise only?
something like (click)="setDefault(customer | async)" <------this doesnt
work because pipe cause compilation error when used inside event binding
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/angular/210bb415-165a-4c61-9c1a-56f64f9c794c%40googlegroups.com.