@@ -36,14 +36,23 @@ import {
36
36
MatTooltipModule ,
37
37
MatStepperModule ,
38
38
MatSnackBar ,
39
+ MatDialog ,
39
40
} from '@angular/material' ;
40
41
import {
41
42
CdkTableModule ,
42
43
DataSource
43
44
} from '@angular/cdk/table' ;
45
+ import { Overlay } from '@angular/cdk/overlay' ;
44
46
45
47
import { of as observableOf } from 'rxjs/observable/of' ;
46
48
49
+
50
+ @Component ( {
51
+ template : `<button>Do the thing</button>`
52
+ } )
53
+ export class TestDialog { }
54
+
55
+
47
56
@Component ( {
48
57
selector : 'kitchen-sink' ,
49
58
templateUrl : './kitchen-sink.html' ,
@@ -60,9 +69,13 @@ export class KitchenSink {
60
69
disconnect : ( ) => { }
61
70
} ;
62
71
63
- constructor ( snackBar : MatSnackBar ) {
72
+ constructor ( snackBar : MatSnackBar , dialog : MatDialog , overlay : Overlay ) {
64
73
// Open a snack bar to do a basic sanity check of the overlays.
65
74
snackBar . open ( 'Hello there' ) ;
75
+
76
+ // TODO(crisbeto): use the noop scroll strategy until
77
+ // the fixes for the block scroll strategy get in.
78
+ dialog . open ( TestDialog , { scrollStrategy : overlay . scrollStrategies . noop ( ) } ) ;
66
79
}
67
80
68
81
}
@@ -109,7 +122,8 @@ export class KitchenSink {
109
122
CdkTableModule
110
123
] ,
111
124
bootstrap : [ KitchenSink ] ,
112
- declarations : [ KitchenSink ] ,
125
+ declarations : [ KitchenSink , TestDialog ] ,
126
+ entryComponents : [ TestDialog ] ,
113
127
} )
114
128
export class KitchenSinkClientModule { }
115
129
0 commit comments