We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dialog in service

Thread ID:

Created:

Updated:

Platform:

Replies:

145814 Jul 9,2019 01:47 PM UTC Jul 10,2019 05:08 AM UTC Angular - EJ 2 1
loading
Tags: Dialog
Marko
Asked On July 9, 2019 01:48 PM UTC

Hi Team,


How I can use Dialog and Notification in service in entryComponents?
Example:
Regards

Prince Oliver [Syncfusion]
Replied On July 10, 2019 05:08 AM UTC

Hi Marko, 

Thank you for contacting us. 

You can use the Dialog component and Toast component as an Angular service component. The service is a stateless object that contains public functions and maintains the data throughout the life of an application. These functions can be invoked from any Angular component like Controllers, Directives, and more. Please find the below sample for Dialog Component.  


In above sample,   
            We have created Dialog component as a separate service using @Injectable(). 
            In this service, we have created common functions like showDialog, hideDialog etc.  
            We have shown/hidden the Dialog component with dynamically updated content using showDialog/hideDialog service method when the buttons are clicked. 

For Toast Component, please refer to the following KB documentation: https://www.syncfusion.com/kb/10340/how-to-use-toast-as-an-angular-service 

Kindly check the above solution and let us know if you need any further assistance on this. 

Regards, 
Prince 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon