File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,11 @@ import { ViewController } from '../nav/view-controller';
34
34
export class PopoverCmp {
35
35
@ViewChild ( 'viewport' , { read : ViewContainerRef } ) viewport : ViewContainerRef ;
36
36
37
- private d : any ;
37
+ private d : {
38
+ cssClass ?: string ;
39
+ showBackdrop ?: boolean ;
40
+ enableBackdropDismiss ?: boolean ;
41
+ } ;
38
42
private enabled : boolean ;
39
43
private id : number ;
40
44
private showSpinner : boolean ;
@@ -50,7 +54,10 @@ export class PopoverCmp {
50
54
this . d = _navParams . data . opts ;
51
55
52
56
if ( this . d . cssClass ) {
53
- _renderer . setElementClass ( _elementRef . nativeElement , this . d . cssClass , true ) ;
57
+ this . d . cssClass . split ( ' ' ) . forEach ( cssClass => {
58
+ // Make sure the class isn't whitespace, otherwise it throws exceptions
59
+ if ( cssClass . trim ( ) !== '' ) _renderer . setElementClass ( _elementRef . nativeElement , cssClass , true ) ;
60
+ } ) ;
54
61
}
55
62
56
63
this . id = ( ++ popoverIds ) ;
Original file line number Diff line number Diff line change @@ -189,7 +189,9 @@ class E2EPage {
189
189
}
190
190
191
191
presentLongListPopover ( ev : UIEvent ) {
192
- let popover = this . popoverCtrl . create ( PopoverLongListPage ) ;
192
+ let popover = this . popoverCtrl . create ( PopoverLongListPage , { } , {
193
+ cssClass : 'my-popover popover-class'
194
+ } ) ;
193
195
popover . present ( {
194
196
ev : ev
195
197
} ) ;
You can’t perform that action at this time.
0 commit comments