Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. @Injectable()
  2. export class AlertService implements IAlertService {
  3.  
  4. success(title: string, textMessage: string, textbutton: string) {
  5. return swal({
  6. title: title,
  7. text: textMessage,
  8. type: 'success',
  9. confirmButtonText: textbutton
  10. })
  11. }
  12.  
  13. error(title: string, textMessage: string, textbutton: string) {
  14. return swal({
  15. title: title,
  16. text: textMessage,
  17. type: 'error',
  18. confirmButtonText: textbutton
  19. })
  20. }
  21.  
  22. warning(title: string, textMessage: string, textbutton: string) {
  23. return swal({
  24. title: title,
  25. text: textMessage,
  26. type: 'warning',
  27. confirmButtonText: textbutton
  28. })
  29. }
  30.  
  31. info(title: string, textMessage: string, textbutton: string) {
  32. return swal({
  33. title: title,
  34. text: textMessage,
  35. type: 'info',
  36. confirmButtonText: textbutton
  37. })
  38. }
  39.  
  40. question(title: string, textMessage: string, textbutton: string) {
  41. return swal({
  42. title: title,
  43. text: textMessage,
  44. type: 'question',
  45. confirmButtonText: textbutton
  46. })
  47. }
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement