File tree Expand file tree Collapse file tree 3 files changed +60
-4
lines changed Expand file tree Collapse file tree 3 files changed +60
-4
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,14 @@ export class Button {
210
210
this . _assignCss ( true ) ;
211
211
}
212
212
213
+ /**
214
+ * @private
215
+ */
216
+ ngAfterContentChecked ( ) {
217
+ this . _readIcon ( this . _elementRef . nativeElement ) ;
218
+ this . _assignCss ( true ) ;
219
+ }
220
+
213
221
/**
214
222
* @private
215
223
*/
@@ -256,6 +264,9 @@ export class Button {
256
264
}
257
265
}
258
266
267
+ // Remove any classes that are set already
268
+ this . _setClass ( this . _icon , false ) ;
269
+
259
270
if ( nodes . length > 1 ) {
260
271
if ( nodes [ 0 ] === ICON && nodes [ 1 ] === TEXT ) {
261
272
this . _icon = 'icon-left' ;
Original file line number Diff line number Diff line change @@ -11,12 +11,25 @@ class E2EPage {
11
11
items = [ ] ;
12
12
shouldShow : boolean = true ;
13
13
14
+ moreText : string = "Dynamic More" ;
15
+ archiveText : string = "Dynamic Archive" ;
16
+
14
17
constructor ( private app : App , private nav : NavController ) {
15
- for ( let x = 0 ; x < 20 ; x ++ ) {
18
+ for ( let x = 0 ; x < 5 ; x ++ ) {
16
19
this . items . push ( x ) ;
17
20
}
18
21
}
19
22
23
+ changeDynamic ( ) {
24
+ if ( this . moreText . includes ( "Dynamic" ) ) {
25
+ this . moreText = "Changed More" ;
26
+ this . archiveText = "Changed Archive" ;
27
+ } else {
28
+ this . moreText = "Dynamic More" ;
29
+ this . archiveText = "Dynamic Archive" ;
30
+ }
31
+ }
32
+
20
33
closeOpened ( ) {
21
34
this . list . closeSlidingItems ( ) ;
22
35
}
Original file line number Diff line number Diff line change @@ -83,7 +83,38 @@ <h3>Ben Sperry</h3>
83
83
< button danger (click) ="del(item) ">
84
84
< ion-icon name ="trash "> </ ion-icon > Delete
85
85
</ button >
86
+ </ ion-item-options >
87
+ </ ion-item-sliding >
86
88
89
+ < ion-item-sliding #item >
90
+ < ion-item >
91
+ One Line, dynamic option
92
+ </ ion-item >
93
+ < ion-item-options >
94
+ < button primary >
95
+ < ion-icon name ="more "> </ ion-icon >
96
+ {{ moreText }}
97
+ </ button >
98
+ < button secondary (click) ="archive(item) ">
99
+ < ion-icon name ="archive "> </ ion-icon >
100
+ {{ archiveText }}
101
+ </ button >
102
+ </ ion-item-options >
103
+ </ ion-item-sliding >
104
+
105
+ < ion-item-sliding #item >
106
+ < ion-item >
107
+ One Line, dynamic icon-left option
108
+ </ ion-item >
109
+ < ion-item-options icon-left >
110
+ < button primary >
111
+ < ion-icon name ="more "> </ ion-icon >
112
+ {{ moreText }}
113
+ </ button >
114
+ < button secondary (click) ="archive(item) ">
115
+ < ion-icon name ="archive "> </ ion-icon >
116
+ {{ archiveText }}
117
+ </ button >
87
118
</ ion-item-options >
88
119
</ ion-item-sliding >
89
120
@@ -111,9 +142,10 @@ <h3>ng-for {{data}}</h3>
111
142
112
143
</ ion-list >
113
144
114
- < p >
115
- < button (click) ="closeOpened() "> Close opened items</ button >
116
- </ p >
145
+ < div padding >
146
+ < button block (click) ="changeDynamic() "> Change Dynamic Options</ button >
147
+ < button block (click) ="closeOpened() "> Close Opened Items</ button >
148
+ </ div >
117
149
118
150
</ ion-content >
119
151
You can’t perform that action at this time.
0 commit comments