@@ -3238,8 +3238,8 @@ describe('CdkDrag', () => {
32383238 `
32393239} )
32403240class StandaloneDraggable {
3241- @ViewChild ( 'dragElement' ) dragElement : ElementRef < HTMLElement > ;
3242- @ViewChild ( CdkDrag ) dragInstance : CdkDrag ;
3241+ @ViewChild ( 'dragElement' , { static : false } ) dragElement : ElementRef < HTMLElement > ;
3242+ @ViewChild ( CdkDrag , { static : false } ) dragInstance : CdkDrag ;
32433243 startedSpy = jasmine . createSpy ( 'started spy' ) ;
32443244 endedSpy = jasmine . createSpy ( 'ended spy' ) ;
32453245 releasedSpy = jasmine . createSpy ( 'released spy' ) ;
@@ -3256,8 +3256,8 @@ class StandaloneDraggable {
32563256 `
32573257} )
32583258class StandaloneDraggableWithOnPush {
3259- @ViewChild ( 'dragElement' ) dragElement : ElementRef < HTMLElement > ;
3260- @ViewChild ( CdkDrag ) dragInstance : CdkDrag ;
3259+ @ViewChild ( 'dragElement' , { static : false } ) dragElement : ElementRef < HTMLElement > ;
3260+ @ViewChild ( CdkDrag , { static : false } ) dragInstance : CdkDrag ;
32613261}
32623262
32633263@Component ( {
@@ -3270,7 +3270,7 @@ class StandaloneDraggableWithOnPush {
32703270 `
32713271} )
32723272class StandaloneDraggableSvg {
3273- @ViewChild ( 'dragElement' ) dragElement : ElementRef < SVGElement > ;
3273+ @ViewChild ( 'dragElement' , { static : false } ) dragElement : ElementRef < SVGElement > ;
32743274}
32753275
32763276@Component ( {
@@ -3282,10 +3282,10 @@ class StandaloneDraggableSvg {
32823282 `
32833283} )
32843284class StandaloneDraggableWithHandle {
3285- @ViewChild ( 'dragElement' ) dragElement : ElementRef < HTMLElement > ;
3286- @ViewChild ( 'handleElement' ) handleElement : ElementRef < HTMLElement > ;
3287- @ViewChild ( CdkDrag ) dragInstance : CdkDrag ;
3288- @ViewChild ( CdkDragHandle ) handleInstance : CdkDragHandle ;
3285+ @ViewChild ( 'dragElement' , { static : false } ) dragElement : ElementRef < HTMLElement > ;
3286+ @ViewChild ( 'handleElement' , { static : false } ) handleElement : ElementRef < HTMLElement > ;
3287+ @ViewChild ( CdkDrag , { static : false } ) dragInstance : CdkDrag ;
3288+ @ViewChild ( CdkDragHandle , { static : false } ) handleInstance : CdkDragHandle ;
32893289}
32903290
32913291@Component ( {
@@ -3300,8 +3300,8 @@ class StandaloneDraggableWithHandle {
33003300 `
33013301} )
33023302class StandaloneDraggableWithDelayedHandle {
3303- @ViewChild ( 'dragElement' ) dragElement : ElementRef < HTMLElement > ;
3304- @ViewChild ( 'handleElement' ) handleElement : ElementRef < HTMLElement > ;
3303+ @ViewChild ( 'dragElement' , { static : false } ) dragElement : ElementRef < HTMLElement > ;
3304+ @ViewChild ( 'handleElement' , { static : false } ) handleElement : ElementRef < HTMLElement > ;
33053305 showHandle = false ;
33063306}
33073307
@@ -3320,8 +3320,8 @@ class StandaloneDraggableWithDelayedHandle {
33203320 `
33213321} )
33223322class StandaloneDraggableWithIndirectHandle {
3323- @ViewChild ( 'dragElement' ) dragElement : ElementRef < HTMLElement > ;
3324- @ViewChild ( 'handleElement' ) handleElement : ElementRef < HTMLElement > ;
3323+ @ViewChild ( 'dragElement' , { static : false } ) dragElement : ElementRef < HTMLElement > ;
3324+ @ViewChild ( 'handleElement' , { static : false } ) handleElement : ElementRef < HTMLElement > ;
33253325}
33263326
33273327
@@ -3345,7 +3345,7 @@ class StandaloneDraggableWithIndirectHandle {
33453345 `
33463346} )
33473347class StandaloneDraggableWithMultipleHandles {
3348- @ViewChild ( 'dragElement' ) dragElement : ElementRef < HTMLElement > ;
3348+ @ViewChild ( 'dragElement' , { static : false } ) dragElement : ElementRef < HTMLElement > ;
33493349 @ViewChildren ( CdkDragHandle ) handles : QueryList < CdkDragHandle > ;
33503350}
33513351
@@ -3371,7 +3371,7 @@ const DROP_ZONE_FIXTURE_TEMPLATE = `
33713371@Component ( { template : DROP_ZONE_FIXTURE_TEMPLATE } )
33723372class DraggableInDropZone {
33733373 @ViewChildren ( CdkDrag ) dragItems : QueryList < CdkDrag > ;
3374- @ViewChild ( CdkDropList ) dropInstance : CdkDropList ;
3374+ @ViewChild ( CdkDropList , { static : false } ) dropInstance : CdkDropList ;
33753375 items = [
33763376 { value : 'Zero' , height : ITEM_HEIGHT , margin : 0 } ,
33773377 { value : 'One' , height : ITEM_HEIGHT , margin : 0 } ,
@@ -3427,7 +3427,7 @@ class DraggableInOnPushDropZone extends DraggableInDropZone {}
34273427} )
34283428class DraggableInHorizontalDropZone {
34293429 @ViewChildren ( CdkDrag ) dragItems : QueryList < CdkDrag > ;
3430- @ViewChild ( CdkDropList ) dropInstance : CdkDropList ;
3430+ @ViewChild ( CdkDropList , { static : false } ) dropInstance : CdkDropList ;
34313431 items = [
34323432 { value : 'Zero' , width : ITEM_WIDTH , margin : 0 } ,
34333433 { value : 'One' , width : ITEM_WIDTH , margin : 0 } ,
@@ -3461,7 +3461,7 @@ class DraggableInHorizontalDropZone {
34613461 `
34623462} )
34633463class DraggableInDropZoneWithCustomPreview {
3464- @ViewChild ( CdkDropList ) dropInstance : CdkDropList ;
3464+ @ViewChild ( CdkDropList , { static : false } ) dropInstance : CdkDropList ;
34653465 @ViewChildren ( CdkDrag ) dragItems : QueryList < CdkDrag > ;
34663466 items = [ 'Zero' , 'One' , 'Two' , 'Three' ] ;
34673467 boundarySelector : string ;
@@ -3606,9 +3606,9 @@ class ConnectedDropZonesViaGroupDirective extends ConnectedDropZones {
36063606 `
36073607} )
36083608class DraggableWithAlternateRoot {
3609- @ViewChild ( 'dragElement' ) dragElement : ElementRef < HTMLElement > ;
3610- @ViewChild ( 'dragRoot' ) dragRoot : ElementRef < HTMLElement > ;
3611- @ViewChild ( CdkDrag ) dragInstance : CdkDrag ;
3609+ @ViewChild ( 'dragElement' , { static : false } ) dragElement : ElementRef < HTMLElement > ;
3610+ @ViewChild ( 'dragRoot' , { static : false } ) dragRoot : ElementRef < HTMLElement > ;
3611+ @ViewChild ( CdkDrag , { static : false } ) dragInstance : CdkDrag ;
36123612 rootElementSelector : string ;
36133613}
36143614
@@ -3667,9 +3667,9 @@ class ConnectedDropZonesWithSingleItems {
36673667 `
36683668} )
36693669class NestedDropListGroups {
3670- @ViewChild ( 'group' ) group : CdkDropListGroup < CdkDropList > ;
3671- @ViewChild ( 'listOne' ) listOne : CdkDropList ;
3672- @ViewChild ( 'listTwo' ) listTwo : CdkDropList ;
3670+ @ViewChild ( 'group' , { static : false } ) group : CdkDropListGroup < CdkDropList > ;
3671+ @ViewChild ( 'listOne' , { static : false } ) listOne : CdkDropList ;
3672+ @ViewChild ( 'listTwo' , { static : false } ) listTwo : CdkDropList ;
36733673}
36743674
36753675
@@ -3694,7 +3694,7 @@ class DraggableOnNgContainer {}
36943694} )
36953695class DraggableInDropZoneWithoutEvents {
36963696 @ViewChildren ( CdkDrag ) dragItems : QueryList < CdkDrag > ;
3697- @ViewChild ( CdkDropList ) dropInstance : CdkDropList ;
3697+ @ViewChild ( CdkDropList , { static : false } ) dropInstance : CdkDropList ;
36983698 items = [
36993699 { value : 'Zero' , height : ITEM_HEIGHT } ,
37003700 { value : 'One' , height : ITEM_HEIGHT } ,
0 commit comments