diff options
Diffstat (limited to 'src/app/messages.service.ts')
-rw-r--r-- | src/app/messages.service.ts | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/app/messages.service.ts b/src/app/messages.service.ts index 6d18405..0d323bb 100644 --- a/src/app/messages.service.ts +++ b/src/app/messages.service.ts | |||
@@ -6,6 +6,9 @@ import { Injectable } from '@angular/core'; | |||
6 | export class MessagesService { | 6 | export class MessagesService { |
7 | 7 | ||
8 | private error:string; | 8 | private error:string; |
9 | private warning:string; | ||
10 | private info:string; | ||
11 | private success:string; | ||
9 | 12 | ||
10 | constructor() { } | 13 | constructor() { } |
11 | 14 | ||
@@ -20,4 +23,40 @@ export class MessagesService { | |||
20 | dismissError(){ | 23 | dismissError(){ |
21 | this.error=''; | 24 | this.error=''; |
22 | } | 25 | } |
26 | |||
27 | getWarning() :string{ | ||
28 | return this.warning; | ||
29 | } | ||
30 | |||
31 | pushWarning(errorText:string){ | ||
32 | this.warning = errorText; | ||
33 | } | ||
34 | |||
35 | dismissWarning(){ | ||
36 | this.warning=''; | ||
37 | } | ||
38 | |||
39 | getSuccess() :string{ | ||
40 | return this.success; | ||
41 | } | ||
42 | |||
43 | pushSuccess(errorText:string){ | ||
44 | this.success = errorText; | ||
45 | } | ||
46 | |||
47 | dismissSuccess(){ | ||
48 | this.success=''; | ||
49 | } | ||
50 | |||
51 | getInformation() :string{ | ||
52 | return this.info; | ||
53 | } | ||
54 | |||
55 | pushInformation(errorText:string){ | ||
56 | this.info = errorText; | ||
57 | } | ||
58 | |||
59 | dismissInformation(){ | ||
60 | this.info=''; | ||
61 | } | ||
23 | } | 62 | } |