mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor: remove internal usages of deprecated apis (#12316)
Removes a handful of internal usages of APIs that have been deprecated.
This commit is contained in:
committed by
mmalerba
parent
f0a0ab109e
commit
bd76f1a345
@@ -23,7 +23,7 @@ import {
|
||||
ContentChildren,
|
||||
QueryList,
|
||||
} from '@angular/core';
|
||||
import {DOCUMENT} from '@angular/platform-browser';
|
||||
import {DOCUMENT} from '@angular/common';
|
||||
import {Directionality} from '@angular/cdk/bidi';
|
||||
import {CdkDragHandle} from './drag-handle';
|
||||
import {CdkDropContainer, CDK_DROP_CONTAINER} from './drop-container';
|
||||
|
||||
@@ -442,7 +442,7 @@ export class MatDatepicker<D> implements OnDestroy, CanColor {
|
||||
/** Create the popup PositionStrategy. */
|
||||
private _createPopupPositionStrategy(): PositionStrategy {
|
||||
return this._overlay.position()
|
||||
.flexibleConnectedTo(this._datepickerInput.getPopupConnectionElementRef())
|
||||
.flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin())
|
||||
.withTransformOriginOn('.mat-datepicker-content')
|
||||
.withFlexibleDimensions(false)
|
||||
.withViewportMargin(8)
|
||||
|
||||
@@ -455,7 +455,7 @@ describe('MatSelectionList without forms', () => {
|
||||
}));
|
||||
|
||||
it('should set its initial selected state in the selectedOptions', () => {
|
||||
let optionEl = listItemEl.injector.get(MatListOption);
|
||||
let optionEl = listItemEl.injector.get<MatListOption>(MatListOption);
|
||||
let selectedOptions = selectionList.componentInstance.selectedOptions;
|
||||
expect(selectedOptions.isSelected(optionEl)).toBeTruthy();
|
||||
});
|
||||
@@ -633,7 +633,8 @@ describe('MatSelectionList without forms', () => {
|
||||
// property of the selection list has been updated, the ripple directive can be used.
|
||||
// Inspecting the host classes of the options doesn't work because those update as part
|
||||
// of the parent template (of the selection-list).
|
||||
const listOptionRipple = listOption[2].query(By.directive(MatRipple)).injector.get(MatRipple);
|
||||
const listOptionRipple = listOption[2].query(By.directive(MatRipple))
|
||||
.injector.get<MatRipple>(MatRipple);
|
||||
|
||||
expect(listOptionRipple.disabled)
|
||||
.toBe(true, 'Expected ripples of list option to be disabled');
|
||||
|
||||
Reference in New Issue
Block a user