1
- < ng-template #modalContent let-close ="close ">
2
- < div class ="modal-header ">
3
- < h5 class ="modal-title "> Event action occurred</ h5 >
4
- < button type ="button " class ="close " (click) ="close() ">
5
- < span aria-hidden ="true "> ×</ span >
6
- </ button >
7
- </ div >
8
- < div class ="modal-body ">
9
- < div >
10
- Action:
11
- < pre > {{ modalData?.action }}</ pre >
12
- </ div >
13
- < div >
14
- Event:
15
- < pre > {{ modalData?.event | json }}</ pre >
16
- </ div >
17
- </ div >
18
- < div class ="modal-footer ">
19
- < button type ="button " class ="btn btn-outline-secondary " (click) ="close() ">
20
- OK
21
- </ button >
22
- </ div >
23
- </ ng-template >
24
-
25
1
< div class ="row text-center ">
26
2
< div class ="col-md-4 ">
27
3
< div class ="btn-group ">
@@ -30,7 +6,7 @@ <h5 class="modal-title">Event action occurred</h5>
30
6
mwlCalendarPreviousView
31
7
[view] ="view "
32
8
[(viewDate)] ="viewDate "
33
- (viewDateChange) ="activeDayIsOpen = false "
9
+ (viewDateChange) ="closeOpenMonthViewDay() "
34
10
>
35
11
Previous
36
12
</ div >
@@ -46,7 +22,7 @@ <h5 class="modal-title">Event action occurred</h5>
46
22
mwlCalendarNextView
47
23
[view] ="view "
48
24
[(viewDate)] ="viewDate "
49
- (viewDateChange) ="activeDayIsOpen = false "
25
+ (viewDateChange) ="closeOpenMonthViewDay() "
50
26
>
51
27
Next
52
28
</ div >
@@ -59,21 +35,21 @@ <h3>{{ viewDate | calendarDate:(view + 'ViewTitle'):'en' }}</h3>
59
35
< div class ="btn-group ">
60
36
< div
61
37
class ="btn btn-primary "
62
- (click) ="view = CalendarView.Month "
38
+ (click) ="setView( CalendarView.Month) "
63
39
[class.active] ="view === CalendarView.Month "
64
40
>
65
41
Month
66
42
</ div >
67
43
< div
68
44
class ="btn btn-primary "
69
- (click) ="view = CalendarView.Week "
45
+ (click) ="setView( CalendarView.Week) "
70
46
[class.active] ="view === CalendarView.Week "
71
47
>
72
48
Week
73
49
</ div >
74
50
< div
75
51
class ="btn btn-primary "
76
- (click) ="view = CalendarView.Day "
52
+ (click) ="setView( CalendarView.Day) "
77
53
[class.active] ="view === CalendarView.Day "
78
54
>
79
55
Day
@@ -114,6 +90,8 @@ <h3>{{ viewDate | calendarDate:(view + 'ViewTitle'):'en' }}</h3>
114
90
</ mwl-calendar-day-view >
115
91
</ div >
116
92
93
+ <!-- Everything you see below is just for the demo, you don't need to include it in your app -->
94
+
117
95
< br /> < br /> < br />
118
96
119
97
< h3 >
137
115
</ thead >
138
116
139
117
< tbody >
140
- < tr *ngFor ="let event of events; let index = index ">
118
+ < tr *ngFor ="let event of events ">
141
119
< td >
142
120
< input
143
121
type ="text "
@@ -191,13 +169,34 @@ <h3>
191
169
/>
192
170
</ td >
193
171
< td >
194
- < button
195
- class ="btn btn-danger "
196
- (click) ="events.splice(index, 1); refresh.next() "
197
- >
172
+ < button class ="btn btn-danger " (click) ="deleteEvent(event) ">
198
173
Delete
199
174
</ button >
200
175
</ td >
201
176
</ tr >
202
177
</ tbody >
203
178
</ table >
179
+
180
+ < ng-template #modalContent let-close ="close ">
181
+ < div class ="modal-header ">
182
+ < h5 class ="modal-title "> Event action occurred</ h5 >
183
+ < button type ="button " class ="close " (click) ="close() ">
184
+ < span aria-hidden ="true "> ×</ span >
185
+ </ button >
186
+ </ div >
187
+ < div class ="modal-body ">
188
+ < div >
189
+ Action:
190
+ < pre > {{ modalData?.action }}</ pre >
191
+ </ div >
192
+ < div >
193
+ Event:
194
+ < pre > {{ modalData?.event | json }}</ pre >
195
+ </ div >
196
+ </ div >
197
+ < div class ="modal-footer ">
198
+ < button type ="button " class ="btn btn-outline-secondary " (click) ="close() ">
199
+ OK
200
+ </ button >
201
+ </ div >
202
+ </ ng-template >
0 commit comments