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:
Kristiyan Kostadinov
2018-07-24 22:29:39 +02:00
committed by mmalerba
parent f0a0ab109e
commit bd76f1a345
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -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';
+1 -1
View File
@@ -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)
+3 -2
View File
@@ -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');