Replies: 3 comments
-
const promise = new Promise((res, rej) => {
if (Math.random() < 0.85) {
setTimeout(res, 2000);
} else {
setTimeout(rej, 2000);
}
});
from(promise)
.pipe(
this.toast.observe({
loading: { content: 'Preparing toast', style: { width: '200px' } },
error: { content: 'Whoops, it burnt', style: { width: '200px' } },
success: { content: `Here's your toast`, style: { width: '200px' } },
}),
catchError((error) => of(error))
)
.subscribe(); |
Beta Was this translation helpful? Give feedback.
0 replies
-
is there a way to add the message param to |
Beta Was this translation helpful? Give feedback.
0 replies
-
Not as of now.
Thanks,
Dharmen Shah
…On Tue, 27 Feb, 2024, 9:46 pm Jonathan Ngbonga, ***@***.***> wrote:
is there a way to add the message param to updateToast? instead of
calling updateMessage?
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABUDZMYZWFI6CT2RZ3P6PQTYVYBGLAVCNFSM6AAAAABDYLLRL2VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DMMBXGUYDO>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to use a promise instead of an observable? or pass a message to the
updateToast
methodBeta Was this translation helpful? Give feedback.
All reactions